@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( empty($values) || ! isset($values['fields']) || empty($values['fields']) ) { ?> |
|
3 | -<div class="frm_forms <?php echo FrmFormsHelper::get_form_style_class($form); ?>" id="frm_form_<?php echo esc_attr( $form->id ) ?>_container"> |
|
2 | +if ( empty( $values ) || ! isset( $values['fields'] ) || empty( $values['fields'] ) ) { ?> |
|
3 | +<div class="frm_forms <?php echo FrmFormsHelper::get_form_style_class( $form ); ?>" id="frm_form_<?php echo esc_attr( $form->id ) ?>_container"> |
|
4 | 4 | <div class="frm_error_style"><strong><?php _e( 'Oops!', 'formidable' ) ?></strong> <?php printf( __( 'You did not add any fields to your form. %1$sGo back%2$s and add some.', 'formidable' ), '<a href="' . esc_url( admin_url( '?page=formidable&frm_action=edit&id=' . $form->id ) ) . '">', '</a>' ) ?> |
5 | 5 | </div> |
6 | 6 | </div> |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | <div class="frm_form_fields <?php echo esc_attr( apply_filters( 'frm_form_fields_class', '', $values ) ); ?>"> |
19 | 19 | <fieldset> |
20 | 20 | <?php echo FrmFormsHelper::replace_shortcodes( $values['before_html'], $form, $title, $description ); ?> |
21 | -<input type="hidden" name="frm_action" value="<?php echo esc_attr($form_action) ?>" /> |
|
22 | -<input type="hidden" name="form_id" value="<?php echo esc_attr($form->id) ?>" /> |
|
23 | -<input type="hidden" name="frm_hide_fields_<?php echo esc_attr( $form->id ) ?>" id="frm_hide_fields_<?php echo esc_attr( $form->id ) ?>" value="<?php echo esc_attr($frm_hide_fields) ?>" /> |
|
24 | -<input type="hidden" name="form_key" value="<?php echo esc_attr($form->form_key) ?>" /> |
|
21 | +<input type="hidden" name="frm_action" value="<?php echo esc_attr( $form_action ) ?>" /> |
|
22 | +<input type="hidden" name="form_id" value="<?php echo esc_attr( $form->id ) ?>" /> |
|
23 | +<input type="hidden" name="frm_hide_fields_<?php echo esc_attr( $form->id ) ?>" id="frm_hide_fields_<?php echo esc_attr( $form->id ) ?>" value="<?php echo esc_attr( $frm_hide_fields ) ?>" /> |
|
24 | +<input type="hidden" name="form_key" value="<?php echo esc_attr( $form->form_key ) ?>" /> |
|
25 | 25 | <input type="hidden" name="item_meta[0]" value="" /> |
26 | 26 | <?php wp_nonce_field( 'frm_submit_entry_nonce', 'frm_submit_entry_' . $form->id ); ?> |
27 | 27 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } else { |
35 | 35 | do_action( 'frm_show_other_field_type', $field, $form, array( 'action' => $form_action ) ); |
36 | 36 | } |
37 | - do_action('frm_get_field_scripts', $field, $form, $form->id); |
|
37 | + do_action( 'frm_get_field_scripts', $field, $form, $form->id ); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | if ( FrmAppHelper::is_admin() ) { ?> |
43 | 43 | <div class="frm_form_field form-field"> |
44 | 44 | <label class="frm_primary_label"><?php _e( 'Entry Key', 'formidable' ) ?></label> |
45 | -<input type="text" name="item_key" value="<?php echo esc_attr($values['item_key']) ?>" /> |
|
45 | +<input type="text" name="item_key" value="<?php echo esc_attr( $values['item_key'] ) ?>" /> |
|
46 | 46 | </div> |
47 | 47 | <?php } else { ?> |
48 | -<input type="hidden" name="item_key" value="<?php echo esc_attr($values['item_key']) ?>" /> |
|
48 | +<input type="hidden" name="item_key" value="<?php echo esc_attr( $values['item_key'] ) ?>" /> |
|
49 | 49 | <?php } |
50 | 50 | |
51 | -do_action('frm_entry_form', $form, $form_action, $errors); |
|
51 | +do_action( 'frm_entry_form', $form, $form_action, $errors ); |
|
52 | 52 | |
53 | 53 | global $frm_vars; |
54 | 54 | // close open section div |
@@ -58,23 +58,23 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | // close open collapsible toggle div |
61 | -if ( isset($frm_vars['collapse_div']) && $frm_vars['collapse_div'] ) { |
|
61 | +if ( isset( $frm_vars['collapse_div'] ) && $frm_vars['collapse_div'] ) { |
|
62 | 62 | echo "</div>\n"; |
63 | - unset($frm_vars['collapse_div']); |
|
63 | + unset( $frm_vars['collapse_div'] ); |
|
64 | 64 | } |
65 | 65 | |
66 | -echo FrmFormsHelper::replace_shortcodes($values['after_html'], $form); |
|
66 | +echo FrmFormsHelper::replace_shortcodes( $values['after_html'], $form ); |
|
67 | 67 | |
68 | 68 | |
69 | -if ( has_action('frm_entries_footer_scripts') ) { ?> |
|
69 | +if ( has_action( 'frm_entries_footer_scripts' ) ) { ?> |
|
70 | 70 | <script type="text/javascript"> |
71 | -<?php do_action('frm_entries_footer_scripts', $values['fields'], $form); ?> |
|
71 | +<?php do_action( 'frm_entries_footer_scripts', $values['fields'], $form ); ?> |
|
72 | 72 | </script><?php |
73 | 73 | } |
74 | 74 | |
75 | 75 | if ( FrmForm::show_submit( $form ) ) { |
76 | - unset($values['fields']); |
|
77 | - FrmFormsHelper::get_custom_submit($values['submit_html'], $form, $submit, $form_action, $values); |
|
76 | + unset( $values['fields'] ); |
|
77 | + FrmFormsHelper::get_custom_submit( $values['submit_html'], $form, $submit, $form_action, $values ); |
|
78 | 78 | } |
79 | 79 | ?> |
80 | 80 | </fieldset> |