Form Builder | Create Responsive Contact Forms - Version 1.9.8.4

Version Description

Download this release

Release Info

Developer umarbajwa
Plugin Icon 128x128 Form Builder | Create Responsive Contact Forms
Version 1.9.8.4
Comparing to
See all releases

Code changes from version 1.9.8.3 to 1.9.8.4

Files changed (35) hide show
  1. admin/Ask-Rev.php +19 -22
  2. admin/assets/img/campaign-monitor-extension-icon-768x516.png +0 -0
  3. admin/assets/img/edit-messages-icon-768x516.png +0 -0
  4. admin/assets/img/google-captcha-extenstion.png +0 -0
  5. admin/assets/img/mailchimp-extension-icon-768x516.png +0 -0
  6. admin/assets/img/stack.png +0 -0
  7. admin/core/class/class-smuzform-admin.php +10 -10
  8. admin/core/class/class-smuzform-entry-model.php +8 -8
  9. admin/core/class/class-smuzform-model.php +22 -4
  10. admin/core/class/class-smuzform-notification-manager.php +2 -2
  11. admin/core/class/class-smuzform-notification-model.php +8 -4
  12. admin/views/add-ons/main.php +5 -5
  13. admin/views/backbone/form-settings.php +2 -2
  14. admin/views/entry/datatable.php +1 -1
  15. admin/views/entry/edit-entry.php +5 -5
  16. admin/views/entry/settings-page.php +1 -1
  17. admin/views/forms-main.php +2 -2
  18. admin/views/notification/backbone/collection.php +1 -1
  19. admin/views/notification/confirmation-email/html-message.php +1 -1
  20. admin/views/notification/emails/html/html-message.php +1 -1
  21. admin/views/notification/emails/single.php +1 -1
  22. admin/views/notification/settings-page.php +1 -1
  23. admin/views/settings-page.php +2 -2
  24. admin/views/style/settings-page.php +1 -1
  25. forms.php +1 -1
  26. public/core/class/class-smuzform-public-storage.php +8 -8
  27. public/core/class/class-smuzform-public.php +1 -1
  28. public/views/form/html-submit-view.php +3 -3
  29. public/views/form/multipage/render-fields.php +22 -22
  30. public/views/form/multipage/render.php +2 -2
  31. public/views/form/render-advanced-fields.php +39 -39
  32. public/views/form/render-html-fields.php +1 -1
  33. public/views/form/render-no-script.php +17 -17
  34. public/views/form/render.php +22 -22
  35. readme.txt +1 -1
admin/Ask-Rev.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
4
  function websCF_check_installation_date() {
5
 
6
  $nobug = "";
7
- $nobug = get_option('websCF_no_bugs');
8
 
9
  if (!$nobug) {
10
 
@@ -21,40 +21,37 @@ function websCF_display_admin_notice() {
21
 
22
  $nobugurl = get_admin_url() . '?mpspdontbug=1';
23
 
24
- $install_date = get_option( 'websCF_activation_date' );
25
-
26
  echo '<div class="psprev-adm-notice psprev-adm-notice-wp-rating notice">';
27
 
28
  echo '<h4>' . __( 'Thank you for using Contact Form', 'contact-form-add' ) . '</h4>';
29
 
30
  echo '<p>' . __( 'If you enjoy using <strong>Contact Form Plugin</strong> please leave us a <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span> review. Reviews like yours help us improve the plugin.', 'contact-form-add' ) . '</p>';
31
 
32
- echo '<a class="psprev-adm-notice-link" href="'.$reviewurl.'" target="_blank"><span class="dashicons dashicons-edit"></span>' . __( 'Leave a Review', 'contact-form-add' ) . '</a>';
33
 
34
- echo '<a href="' . $nobugurl . '" type="button" class="notice-dismiss notice-dismiss-psp"><span class="screen-reader-text">Dismiss this notice.</span></a>';
35
 
36
- // echo( __( "You have been using our Posts Slider for more than a week now, do you like it? If so, please leave us a review with your feedback! <a href=".$reviewurl." target='_blank' class='button button-primary' style='margin:0 20px;'>Leave A Review</a> <a href=".$nobugurl." style='font-size:9px;'>Leave Me Alone</a>" ) );
37
 
38
  echo "</div>";
39
 
40
  echo "<style>
41
 
42
- .psprev-adm-notice-activation { border-color: #41c4ff; }
43
- .psprev-adm-notice-activation h4 { font-size: 1.05em; }
44
- .psprev-adm-notice-activation a { text-decoration: none; }
45
- .psprev-adm-notice-activation .psprev-adm-notice-link { display: inline-block; padding: 6px 8px; margin-bottom: 10px; color: rgba(52,152,219,1); font-weight: 500; background: #e9e9e9; border-radius: 2px; margin-right: 10px; }
46
- .psprev-adm-notice-activation .psprev-adm-notice-link span { display: inline-block; text-decoration: none; margin-right: 10px; }
47
- .psprev-adm-notice-activation .psprev-adm-notice-link:hover { color: #fff; background:#41c4ff; }
48
 
49
- .psprev-adm-notice-wp-rating { border-color: rgba(52,152,219,0.75); }
50
- .psprev-adm-notice-wp-rating h4 { font-size: 1.05em; }
51
- .psprev-adm-notice-wp-rating p:last-of-type { margin-bottom: 20px; }
52
- .psprev-adm-notice-wp-rating a { text-decoration: none; }
53
- .psprev-adm-notice-wp-rating .psprev-adm-notice-link { display: inline-block; padding: 6px 8px; margin-bottom: 10px; color: rgba(52,152,219,1); font-weight: 500; background: #e9e9e9; border-radius: 2px; margin-right: 10px; }
54
- .psprev-adm-notice-wp-rating .psprev-adm-notice-link span { display: inline-block; text-decoration: none; margin-right: 10px; }
55
- .psprev-adm-notice-wp-rating .psprev-adm-notice-link:hover { color: #fff; background: rgba(52,152,219,0.75); }
56
- .psprev-adm-notice-wp-rating .dashicons-star-filled { position: relative; top: 1px; width: 15px; height: 15px; font-size: 15px; }
57
- .notice-dismiss-psp { top: 8% !important; right: 1.5% !important; }
58
  </style>";
59
 
60
  }
@@ -64,7 +61,7 @@ function websCF_set_no_bug() {
64
  $nobug = "";
65
 
66
  if ( isset( $_GET['mpspdontbug'] ) ) {
67
- $nobug = esc_attr( $_GET['mpspdontbug'] );
68
  }
69
 
70
  if ( 1 == $nobug ) {
4
  function websCF_check_installation_date() {
5
 
6
  $nobug = "";
7
+ $nobug = sanitize_text_field( get_option('websCF_no_bugs') );
8
 
9
  if (!$nobug) {
10
 
21
 
22
  $nobugurl = get_admin_url() . '?mpspdontbug=1';
23
 
 
 
24
  echo '<div class="psprev-adm-notice psprev-adm-notice-wp-rating notice">';
25
 
26
  echo '<h4>' . __( 'Thank you for using Contact Form', 'contact-form-add' ) . '</h4>';
27
 
28
  echo '<p>' . __( 'If you enjoy using <strong>Contact Form Plugin</strong> please leave us a <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span> review. Reviews like yours help us improve the plugin.', 'contact-form-add' ) . '</p>';
29
 
30
+ echo '<a class="psprev-adm-notice-link" href="'.esc_url( $reviewurl ).'" target="_blank"><span class="dashicons dashicons-edit"></span>' . __( 'Leave a Review', 'contact-form-add' ) . '</a>';
31
 
32
+ echo '<a href="' . esc_url( $nobugurl ). '" type="button" class="notice-dismiss notice-dismiss-psp"><span class="screen-reader-text">Dismiss this notice.</span></a>';
33
 
 
34
 
35
  echo "</div>";
36
 
37
  echo "<style>
38
 
39
+ .psprev-adm-notice-activation { border-color: #41c4ff; }
40
+ .psprev-adm-notice-activation h4 { font-size: 1.05em; }
41
+ .psprev-adm-notice-activation a { text-decoration: none; }
42
+ .psprev-adm-notice-activation .psprev-adm-notice-link { display: inline-block; padding: 6px 8px; margin-bottom: 10px; color: rgba(52,152,219,1); font-weight: 500; background: #e9e9e9; border-radius: 2px; margin-right: 10px; }
43
+ .psprev-adm-notice-activation .psprev-adm-notice-link span { display: inline-block; text-decoration: none; margin-right: 10px; }
44
+ .psprev-adm-notice-activation .psprev-adm-notice-link:hover { color: #fff; background:#41c4ff; }
45
 
46
+ .psprev-adm-notice-wp-rating { border-color: rgba(52,152,219,0.75); }
47
+ .psprev-adm-notice-wp-rating h4 { font-size: 1.05em; }
48
+ .psprev-adm-notice-wp-rating p:last-of-type { margin-bottom: 20px; }
49
+ .psprev-adm-notice-wp-rating a { text-decoration: none; }
50
+ .psprev-adm-notice-wp-rating .psprev-adm-notice-link { display: inline-block; padding: 6px 8px; margin-bottom: 10px; color: rgba(52,152,219,1); font-weight: 500; background: #e9e9e9; border-radius: 2px; margin-right: 10px; }
51
+ .psprev-adm-notice-wp-rating .psprev-adm-notice-link span { display: inline-block; text-decoration: none; margin-right: 10px; }
52
+ .psprev-adm-notice-wp-rating .psprev-adm-notice-link:hover { color: #fff; background: rgba(52,152,219,0.75); }
53
+ .psprev-adm-notice-wp-rating .dashicons-star-filled { position: relative; top: 1px; width: 15px; height: 15px; font-size: 15px; }
54
+ .notice-dismiss-psp { top: 8% !important; right: 1.5% !important; }
55
  </style>";
56
 
57
  }
61
  $nobug = "";
62
 
63
  if ( isset( $_GET['mpspdontbug'] ) ) {
64
+ $nobug = sanitize_text_field( $_GET['mpspdontbug'] );
65
  }
66
 
67
  if ( 1 == $nobug ) {
admin/assets/img/campaign-monitor-extension-icon-768x516.png ADDED
Binary file
admin/assets/img/edit-messages-icon-768x516.png ADDED
Binary file
admin/assets/img/google-captcha-extenstion.png ADDED
Binary file
admin/assets/img/mailchimp-extension-icon-768x516.png ADDED
Binary file
admin/assets/img/stack.png CHANGED
Binary file
admin/core/class/class-smuzform-admin.php CHANGED
@@ -181,12 +181,12 @@ class SmuzForm_Admin {
181
 
182
  if ( isset( $_GET['action'] ) ) {
183
 
184
- if ( $_GET['action'] === 'delete_form' ) {
185
 
186
  if ( ! current_user_can( 'manage_options' ) )
187
  exit( 'permissions error' );
188
 
189
- wp_delete_post( intval( $_GET['post_id'] ), true );
190
 
191
  }
192
  }
@@ -206,12 +206,12 @@ class SmuzForm_Admin {
206
 
207
  if ( isset( $_GET['action'] ) ) {
208
 
209
- if ( $_GET['action'] === 'delete_form' ) {
210
 
211
  if ( ! current_user_can( 'manage_options' ) )
212
  exit( 'permissions error' );
213
 
214
- wp_delete_post( intval( $_GET['post_id'] ), true );
215
 
216
  }
217
  }
@@ -239,7 +239,7 @@ class SmuzForm_Admin {
239
  if ( ! isset( $_GET['form_id'] ) )
240
  wp_die( 'Use the form builder page to get here.' );
241
 
242
- $entryManager = new SmuzForm_Entry( intval( $_GET['form_id'] ) );
243
 
244
  include smuzform_admin_view( '/entry/settings-page.php' );
245
 
@@ -253,7 +253,7 @@ class SmuzForm_Admin {
253
  if ( ! isset( $_GET['form_id'] ) )
254
  wp_die( 'Use the form builder page to get here.' );
255
 
256
- $notificationManager = new SmuzForm_Notification_Manager( intval( $_GET['form_id'] ) );
257
 
258
  include smuzform_admin_view( '/notification/settings-page.php' );
259
 
@@ -267,7 +267,7 @@ class SmuzForm_Admin {
267
  if ( ! isset( $_GET['form_id'] ) )
268
  wp_die( 'Use the form builder page to get here.' );
269
 
270
- $styleManager = new SmuzForm_Style_Manager( intval( $_GET['form_id'] ) );
271
 
272
  include smuzform_admin_view( '/style/settings-page.php' );
273
 
@@ -416,7 +416,7 @@ class SmuzForm_Admin {
416
  $js_form_id = null;
417
 
418
  if ( isset( $_GET['form_id'] ) )
419
- $js_form_id = intval( $_GET['form_id'] );
420
 
421
  $js = array(
422
  'admin_url' => admin_url(),
@@ -496,7 +496,7 @@ class SmuzForm_Admin {
496
  $js_form_id = null;
497
 
498
  if ( isset( $_GET['form_id'] ) )
499
- $js_form_id = intval( $_GET['form_id'] );
500
 
501
  $js = array(
502
  'admin_url' => admin_url(),
@@ -579,7 +579,7 @@ class SmuzForm_Admin {
579
  $js_form_id = null;
580
 
581
  if ( isset( $_GET['form_id'] ) )
582
- $js_form_id = intval( $_GET['form_id'] );
583
 
584
  $js = array(
585
  'admin_url' => admin_url(),
181
 
182
  if ( isset( $_GET['action'] ) ) {
183
 
184
+ if ( sanitize_text_field( $_GET['action'] ) === 'delete_form' ) {
185
 
186
  if ( ! current_user_can( 'manage_options' ) )
187
  exit( 'permissions error' );
188
 
189
+ wp_delete_post( sanitize_text_field( $_GET['post_id'] ), true );
190
 
191
  }
192
  }
206
 
207
  if ( isset( $_GET['action'] ) ) {
208
 
209
+ if ( sanitize_text_field( $_GET['action'] ) === 'delete_form' ) {
210
 
211
  if ( ! current_user_can( 'manage_options' ) )
212
  exit( 'permissions error' );
213
 
214
+ wp_delete_post( sanitize_text_field( $_GET['post_id'] ), true );
215
 
216
  }
217
  }
239
  if ( ! isset( $_GET['form_id'] ) )
240
  wp_die( 'Use the form builder page to get here.' );
241
 
242
+ $entryManager = new SmuzForm_Entry( sanitize_text_field( $_GET['form_id'] ) );
243
 
244
  include smuzform_admin_view( '/entry/settings-page.php' );
245
 
253
  if ( ! isset( $_GET['form_id'] ) )
254
  wp_die( 'Use the form builder page to get here.' );
255
 
256
+ $notificationManager = new SmuzForm_Notification_Manager( sanitize_text_field( $_GET['form_id'] ) );
257
 
258
  include smuzform_admin_view( '/notification/settings-page.php' );
259
 
267
  if ( ! isset( $_GET['form_id'] ) )
268
  wp_die( 'Use the form builder page to get here.' );
269
 
270
+ $styleManager = new SmuzForm_Style_Manager( sanitize_text_field( $_GET['form_id'] ) );
271
 
272
  include smuzform_admin_view( '/style/settings-page.php' );
273
 
416
  $js_form_id = null;
417
 
418
  if ( isset( $_GET['form_id'] ) )
419
+ $js_form_id = sanitize_text_field( $_GET['form_id'] );
420
 
421
  $js = array(
422
  'admin_url' => admin_url(),
496
  $js_form_id = null;
497
 
498
  if ( isset( $_GET['form_id'] ) )
499
+ $js_form_id = sanitize_text_field( $_GET['form_id'] );
500
 
501
  $js = array(
502
  'admin_url' => admin_url(),
579
  $js_form_id = null;
580
 
581
  if ( isset( $_GET['form_id'] ) )
582
+ $js_form_id = sanitize_text_field( $_GET['form_id'] );
583
 
584
  $js = array(
585
  'admin_url' => admin_url(),
admin/core/class/class-smuzform-entry-model.php CHANGED
@@ -38,7 +38,7 @@ class SmuzForm_Entry_Model {
38
 
39
  function get() {
40
 
41
- $form_id = intval($_GET['formID']);
42
 
43
  if ( get_post_type( $form_id ) !== $this->post_type )
44
  exit();
@@ -57,19 +57,19 @@ class SmuzForm_Entry_Model {
57
  $displayRecords = SMUZFORM_ENTRIES_PER_PAGE;
58
 
59
  if ( isset( $_POST['length'] ) )
60
- $displayRecords = intval( $_POST['length'] );
61
 
62
  if ( $displayRecords > $totalEntries )
63
  $displayRecords = $totalEntries;
64
 
65
- $searchValue = $_GET['search']['value'];
66
 
67
  if ( ! empty( $searchValue ) ) {
68
  $entries = $entryManager->searchEntries( $searchValue );
69
  } else {
70
 
71
  if ( isset( $_POST['start'] ) && ! empty( $_POST['start'] ) )
72
- $start = intval( $_POST['start'] );
73
  else
74
  $start = 0;
75
 
@@ -100,7 +100,7 @@ class SmuzForm_Entry_Model {
100
  $jsonentries = array();
101
 
102
  $output = array(
103
- "sEcho" => intval($_GET['sEcho']),
104
  "iTotalRecords" => $totalRecords,
105
  "iTotalDisplayRecords" => $totalDisplayRecords,
106
  "aaData" => $jsonentries
@@ -118,8 +118,8 @@ class SmuzForm_Entry_Model {
118
  **/
119
  function delete(){
120
 
121
- $entry_id = intval($_GET['entryID']);
122
- $form_id = intval($_GET['formID']);
123
 
124
  global $wpdb;
125
 
@@ -152,7 +152,7 @@ class SmuzForm_Entry_Model {
152
  exit;
153
 
154
  if ( is_null( $nonce ) && isset( $_GET['nonce'] ) )
155
- $nonce = $_GET['nonce'];
156
 
157
  if ( ! wp_verify_nonce( $nonce, 'smuzform_entry_model' ) )
158
  exit();
38
 
39
  function get() {
40
 
41
+ $form_id = sanitize_text_field($_GET['formID']);
42
 
43
  if ( get_post_type( $form_id ) !== $this->post_type )
44
  exit();
57
  $displayRecords = SMUZFORM_ENTRIES_PER_PAGE;
58
 
59
  if ( isset( $_POST['length'] ) )
60
+ $displayRecords = sanitize_text_field( $_POST['length'] );
61
 
62
  if ( $displayRecords > $totalEntries )
63
  $displayRecords = $totalEntries;
64
 
65
+ $searchValue = sanitize_text_field($_GET['search']['value']);
66
 
67
  if ( ! empty( $searchValue ) ) {
68
  $entries = $entryManager->searchEntries( $searchValue );
69
  } else {
70
 
71
  if ( isset( $_POST['start'] ) && ! empty( $_POST['start'] ) )
72
+ $start = sanitize_text_field( $_POST['start'] );
73
  else
74
  $start = 0;
75
 
100
  $jsonentries = array();
101
 
102
  $output = array(
103
+ "sEcho" => sanitize_text_field($_GET['sEcho']),
104
  "iTotalRecords" => $totalRecords,
105
  "iTotalDisplayRecords" => $totalDisplayRecords,
106
  "aaData" => $jsonentries
118
  **/
119
  function delete(){
120
 
121
+ $entry_id = sanitize_text_field($_GET['entryID']);
122
+ $form_id = sanitize_text_field($_GET['formID']);
123
 
124
  global $wpdb;
125
 
152
  exit;
153
 
154
  if ( is_null( $nonce ) && isset( $_GET['nonce'] ) )
155
+ $nonce = sanitize_text_field( $_GET['nonce'] );
156
 
157
  if ( ! wp_verify_nonce( $nonce, 'smuzform_entry_model' ) )
158
  exit();
admin/core/class/class-smuzform-model.php CHANGED
@@ -43,6 +43,11 @@ class SmuzForm_Model {
43
 
44
  $data = json_decode( file_get_contents( 'php://input' ), true );
45
 
 
 
 
 
 
46
  $form_id = $this->createForm( $data );
47
 
48
  $response = array(
@@ -66,7 +71,15 @@ class SmuzForm_Model {
66
 
67
  $data = json_decode( file_get_contents( 'php://input' ), true );
68
 
69
- $form_id = intval($data['id']);
 
 
 
 
 
 
 
 
70
 
71
  update_post_meta( $form_id, 'model', $data );
72
 
@@ -94,10 +107,15 @@ class SmuzForm_Model {
94
  **/
95
  function get() {
96
 
97
- $form_id = intval($_GET['formID']);
98
 
99
  $data = get_post_meta( $form_id, 'model', true );
100
 
 
 
 
 
 
101
  echo json_encode( $data );
102
 
103
  exit();
@@ -109,7 +127,7 @@ class SmuzForm_Model {
109
  **/
110
  function delete() {
111
 
112
- $form_id = intval($_GET['formID']);
113
 
114
  if ( get_post_type( $form_id ) !== $this->post_type )
115
  exit();
@@ -151,7 +169,7 @@ class SmuzForm_Model {
151
  exit;
152
 
153
  if ( is_null( $nonce ) && isset( $_GET['nonce'] ) )
154
- $nonce = $_GET['nonce'];
155
 
156
  if ( ! wp_verify_nonce( $nonce, 'smuzform_form_model' ) )
157
  exit;
43
 
44
  $data = json_decode( file_get_contents( 'php://input' ), true );
45
 
46
+ // Santize the data
47
+ array_walk_recursive( $data, function( &$value ) {
48
+ $value = sanitize_text_field( $value );
49
+ } );
50
+
51
  $form_id = $this->createForm( $data );
52
 
53
  $response = array(
71
 
72
  $data = json_decode( file_get_contents( 'php://input' ), true );
73
 
74
+ $tempArray = array();
75
+
76
+ // Santize the data
77
+ array_walk_recursive( $data, function( &$value ) {
78
+ $value = sanitize_text_field( $value );
79
+ } );
80
+
81
+
82
+ $form_id = sanitize_text_field($data['id']);
83
 
84
  update_post_meta( $form_id, 'model', $data );
85
 
107
  **/
108
  function get() {
109
 
110
+ $form_id = sanitize_text_field($_GET['formID']);
111
 
112
  $data = get_post_meta( $form_id, 'model', true );
113
 
114
+ // Santize the data
115
+ array_walk_recursive( $data, function( &$value ) {
116
+ $value = sanitize_text_field( $value );
117
+ } );
118
+
119
  echo json_encode( $data );
120
 
121
  exit();
127
  **/
128
  function delete() {
129
 
130
+ $form_id = sanitize_text_field($_GET['formID']);
131
 
132
  if ( get_post_type( $form_id ) !== $this->post_type )
133
  exit();
169
  exit;
170
 
171
  if ( is_null( $nonce ) && isset( $_GET['nonce'] ) )
172
+ $nonce = sanitize_text_field( $_GET['nonce'] );
173
 
174
  if ( ! wp_verify_nonce( $nonce, 'smuzform_form_model' ) )
175
  exit;
admin/core/class/class-smuzform-notification-manager.php CHANGED
@@ -97,10 +97,10 @@ class SmuzForm_Notification_Manager extends SmuzForm_Form {
97
  $headers[] = "Reply-To: $replyTo" . "\r\n";
98
 
99
  if (!empty($fromText)) {
100
- $adm_email = get_option('admin_email');
101
  $headers[] = "From: $fromText <$adm_email>" . "\r\n";
102
  } else {
103
- $adm_email = get_option('admin_email');
104
  $headers[] = "From: WordPress <$adm_email>" . "\r\n";
105
  }
106
 
97
  $headers[] = "Reply-To: $replyTo" . "\r\n";
98
 
99
  if (!empty($fromText)) {
100
+ $adm_email = sanitize_text_field( get_option('admin_email') );
101
  $headers[] = "From: $fromText <$adm_email>" . "\r\n";
102
  } else {
103
+ $adm_email = sanitize_text_field( get_option('admin_email') );
104
  $headers[] = "From: WordPress <$adm_email>" . "\r\n";
105
  }
106
 
admin/core/class/class-smuzform-notification-model.php CHANGED
@@ -52,7 +52,11 @@ class SmuzForm_Notification_Model {
52
 
53
  $data = json_decode( file_get_contents( 'php://input' ), true );
54
 
55
- $form_id = intval($_GET['formID']);
 
 
 
 
56
 
57
  update_post_meta( $form_id, 'notifications', $data );
58
 
@@ -75,7 +79,7 @@ class SmuzForm_Notification_Model {
75
  **/
76
  function get() {
77
 
78
- $form_id = intval($_GET['formID']);
79
 
80
  $data = get_post_meta( $form_id, 'notifications', true );
81
 
@@ -90,7 +94,7 @@ class SmuzForm_Notification_Model {
90
  **/
91
  function delete() {
92
 
93
- $form_id = intval($_GET['formID']);
94
 
95
  if ( get_post_type( $form_id ) !== $this->post_type )
96
  exit();
@@ -110,7 +114,7 @@ class SmuzForm_Notification_Model {
110
  exit;
111
 
112
  if ( is_null( $nonce ) && isset( $_GET['nonce'] ) )
113
- $nonce = $_GET['nonce'];
114
 
115
  if ( ! wp_verify_nonce( $nonce, 'smuzform_notification_model' ) )
116
  exit;
52
 
53
  $data = json_decode( file_get_contents( 'php://input' ), true );
54
 
55
+ array_walk_recursive( $data, function( &$value ) {
56
+ $value = sanitize_text_field( $value );
57
+ } );
58
+
59
+ $form_id = sanitize_text_field($_GET['formID']);
60
 
61
  update_post_meta( $form_id, 'notifications', $data );
62
 
79
  **/
80
  function get() {
81
 
82
+ $form_id = sanitize_text_field($_GET['formID']);
83
 
84
  $data = get_post_meta( $form_id, 'notifications', true );
85
 
94
  **/
95
  function delete() {
96
 
97
+ $form_id = sanitize_text_field($_GET['formID']);
98
 
99
  if ( get_post_type( $form_id ) !== $this->post_type )
100
  exit();
114
  exit;
115
 
116
  if ( is_null( $nonce ) && isset( $_GET['nonce'] ) )
117
+ $nonce = sanitize_text_field( $_GET['nonce'] );
118
 
119
  if ( ! wp_verify_nonce( $nonce, 'smuzform_notification_model' ) )
120
  exit;
admin/views/add-ons/main.php CHANGED
@@ -14,7 +14,7 @@
14
  <div id="gr_wrapper" class="w3-row">
15
  <div class="w3-card gr-item">
16
  <a href="https://web-settler.com/form-builder/">
17
- <img class="w3-center gr_img" src="https://web-settler.com/wp-content/uploads/2016/06/google-captcha-extenstion.png">
18
  </a>
19
  <header class="w3-container w3-center gr_header" >
20
 
@@ -29,7 +29,7 @@
29
  </div>
30
  <div class="w3-card gr-item">
31
  <a href="https://web-settler.com/form-builder/">
32
- <img class="w3-center gr_img" src="https://web-settler.com/wp-content/uploads/2016/06/mailchimp-extension-icon-768x516.png">
33
  </a>
34
  <header class="w3-container w3-center gr_header" >
35
 
@@ -42,7 +42,7 @@
42
  </div>
43
  <div class="w3-card gr-item">
44
  <a href="https://web-settler.com/form-builder/">
45
- <img class="w3-center gr_img" src="https://web-settler.com/wp-content/uploads/2016/06/stack.png">
46
  </a>
47
  <header class="w3-container w3-center gr_header" >
48
 
@@ -56,7 +56,7 @@
56
 
57
  <div class="w3-card gr-item">
58
  <a href="https://web-settler.com/form-builder/">
59
- <img class="w3-center gr_img" src="https://web-settler.com/wp-content/uploads/2016/06/edit-messages-icon-768x516.png">
60
  </a>
61
  <header class="w3-container w3-center gr_header" >
62
 
@@ -70,7 +70,7 @@
70
 
71
  <div class="w3-card gr-item">
72
  <a href="https://web-settler.com/form-builder/">
73
- <img class="w3-center gr_img" src="https://web-settler.com/wp-content/uploads/2016/06/campaign-monitor-extension-icon-768x516.png">
74
  </a>
75
  <header class="w3-container w3-center gr_header" >
76
 
14
  <div id="gr_wrapper" class="w3-row">
15
  <div class="w3-card gr-item">
16
  <a href="https://web-settler.com/form-builder/">
17
+ <img class="w3-center gr_img" src="<?php echo esc_url( smuzform_admin_asset( 'img/google-captcha-extenstion.png' ) ) ?>">
18
  </a>
19
  <header class="w3-container w3-center gr_header" >
20
 
29
  </div>
30
  <div class="w3-card gr-item">
31
  <a href="https://web-settler.com/form-builder/">
32
+ <img class="w3-center gr_img" src="<?php echo esc_url( smuzform_admin_asset( 'img/mailchimp-extension-icon-768x516.png' ) ) ?>">
33
  </a>
34
  <header class="w3-container w3-center gr_header" >
35
 
42
  </div>
43
  <div class="w3-card gr-item">
44
  <a href="https://web-settler.com/form-builder/">
45
+ <img class="w3-center gr_img" src="<?php echo esc_url( smuzform_admin_asset( 'img/stack.png' ) ) ?>">
46
  </a>
47
  <header class="w3-container w3-center gr_header" >
48
 
56
 
57
  <div class="w3-card gr-item">
58
  <a href="https://web-settler.com/form-builder/">
59
+ <img class="w3-center gr_img" src="<?php echo esc_url( smuzform_admin_asset( 'img/edit-messages-icon-768x516.png' ) ) ?>">
60
  </a>
61
  <header class="w3-container w3-center gr_header" >
62
 
70
 
71
  <div class="w3-card gr-item">
72
  <a href="https://web-settler.com/form-builder/">
73
+ <img class="w3-center gr_img" src="<?php echo esc_url( smuzform_admin_asset( 'img/campaign-monitor-extension-icon-768x516.png' ) ) ?>">
74
  </a>
75
  <header class="w3-container w3-center gr_header" >
76
 
admin/views/backbone/form-settings.php CHANGED
@@ -4,11 +4,11 @@
4
 
5
  <div class="form-group">
6
  <label for="formTitle"><?php smuzform_translate_e('Title') ?></label>
7
- <input id="formTitle" type="text" value="<%- title %>" class="form-control" />
8
  </div>
9
  <div class="form-group">
10
  <label for="formDescription"><?php smuzform_translate_e('Description') ?></label>
11
- <textarea id="formDescription" class="form-control"><%- description %></textarea>
12
  </div>
13
 
14
  <div class="form-inline form-group">
4
 
5
  <div class="form-group">
6
  <label for="formTitle"><?php smuzform_translate_e('Title') ?></label>
7
+ <input id="formTitle" type="text" value="<%- _.escape(title) %>" class="form-control" />
8
  </div>
9
  <div class="form-group">
10
  <label for="formDescription"><?php smuzform_translate_e('Description') ?></label>
11
+ <textarea id="formDescription" class="form-control"><%- _.escape(description) %></textarea>
12
  </div>
13
 
14
  <div class="form-inline form-group">
admin/views/entry/datatable.php CHANGED
@@ -2,7 +2,7 @@
2
  <thead>
3
  <tr>
4
  <?php foreach( $entryManager->getFilterFields() as $field ): ?>
5
- <th id="<?php echo $field['cssID'] ?>"><?php echo esc_html( $field['label'] ) ?></th>
6
  <?php endforeach; ?>
7
  </tr>
8
  </thead>
2
  <thead>
3
  <tr>
4
  <?php foreach( $entryManager->getFilterFields() as $field ): ?>
5
+ <th id="<?php echo esc_attr($field['cssID']); ?>"><?php echo esc_html( $field['label'] ) ?></th>
6
  <?php endforeach; ?>
7
  </tr>
8
  </thead>
admin/views/entry/edit-entry.php CHANGED
@@ -5,12 +5,12 @@
5
  <div class="container">
6
  <div class="navbar-header">
7
  <a class="navbar-brand">
8
- <?php smuzform_translate_e( 'Entry View #'. intval($_GET['entry_id']) ) ?>
9
  </a>
10
 
11
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
12
  <li class="navBarActionsLi">
13
- <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms-entry&form_id='.intval($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Entry Manager <' ) ?></a>
14
  </li>
15
  </ul>
16
 
@@ -28,7 +28,7 @@
28
 
29
  <ul>
30
  <?php
31
- $entryFields = $entryManager->getEntry( intval( $_GET['entry_id'] ) );
32
  foreach ( $entryFields as $key => $field ): ?>
33
 
34
  <li class="fieldInfoCont">
@@ -129,7 +129,7 @@
129
 
130
  <div id="formInfoContEntryEditor">
131
  <h2><?php smuzform_translate_e( 'Form Information' ) ?></h2>
132
- <h3><a href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.intval($_GET['form_id']) ); ?>"><?php esc_html_e( $entryManager->getTitle() ) ?></a></h3>
133
  <p><?php esc_html_e( $entryManager->getDescription() ) ?></p>
134
  </div>
135
 
@@ -137,7 +137,7 @@
137
  <h2><?php smuzform_translate_e( 'User Information' ) ?></h2>
138
 
139
  <?php
140
- $userInfo = $entryManager->getEntryUserInfo( intval( $_GET['entry_id'] ) );
141
 
142
  $userAgent = new phpUserAgentStringParser();
143
 
5
  <div class="container">
6
  <div class="navbar-header">
7
  <a class="navbar-brand">
8
+ <?php smuzform_translate_e( 'Entry View #'. sanitize_text_field($_GET['entry_id']) ) ?>
9
  </a>
10
 
11
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
12
  <li class="navBarActionsLi">
13
+ <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms-entry&form_id='.sanitize_text_field($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Entry Manager <' ) ?></a>
14
  </li>
15
  </ul>
16
 
28
 
29
  <ul>
30
  <?php
31
+ $entryFields = $entryManager->getEntry( sanitize_text_field( $_GET['entry_id'] ) );
32
  foreach ( $entryFields as $key => $field ): ?>
33
 
34
  <li class="fieldInfoCont">
129
 
130
  <div id="formInfoContEntryEditor">
131
  <h2><?php smuzform_translate_e( 'Form Information' ) ?></h2>
132
+ <h3><a href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.sanitize_text_field($_GET['form_id']) ); ?>"><?php esc_html_e( $entryManager->getTitle() ) ?></a></h3>
133
  <p><?php esc_html_e( $entryManager->getDescription() ) ?></p>
134
  </div>
135
 
137
  <h2><?php smuzform_translate_e( 'User Information' ) ?></h2>
138
 
139
  <?php
140
+ $userInfo = $entryManager->getEntryUserInfo( sanitize_text_field( $_GET['entry_id'] ) );
141
 
142
  $userAgent = new phpUserAgentStringParser();
143
 
admin/views/entry/settings-page.php CHANGED
@@ -10,7 +10,7 @@
10
 
11
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
12
  <li class="navBarActionsLi">
13
- <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.intval($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Form Builder <' ) ?></a>
14
  </li>
15
  </ul>
16
 
10
 
11
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
12
  <li class="navBarActionsLi">
13
+ <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.sanitize_text_field($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Form Builder <' ) ?></a>
14
  </li>
15
  </ul>
16
 
admin/views/forms-main.php CHANGED
@@ -231,7 +231,7 @@ table tr:hover td{
231
  <td><a class="formtitle_link" href="<?php echo admin_url('admin.php?page=smuz-forms&form_id=' . $form->ID ) ?>"><strong><?php echo get_the_title( $form->ID ) ?></strong></a></td>
232
 
233
  <td class="wp_smf_slides_width"><?php echo count( $tmpForm->getFields() ) ?></td>
234
- <td id="wpsmfshortcodecopy">[sform id='<?php echo $form->ID ?>']</td>
235
  <td><?php echo get_the_date( 'l, F j, Y', $form->ID ); ?></td>
236
  <td class="wp_smf_options_width">
237
  <a id="slr_edit_form" href="#">
@@ -239,7 +239,7 @@ table tr:hover td{
239
  </a>/
240
  <a id="slr_delete_form" href="#">
241
 
242
- <img alt="Delete" class="wp_smf_delete_img" data-id="<?php echo intval($form->ID) ?>" src="<?php echo smuzform_admin_asset( 'img/wp_smf_delete_form_img.png' ) ?>" />
243
  </a>
244
 
245
  </td>
231
  <td><a class="formtitle_link" href="<?php echo admin_url('admin.php?page=smuz-forms&form_id=' . $form->ID ) ?>"><strong><?php echo get_the_title( $form->ID ) ?></strong></a></td>
232
 
233
  <td class="wp_smf_slides_width"><?php echo count( $tmpForm->getFields() ) ?></td>
234
+ <td id="wpsmfshortcodecopy">[sform id='<?php esc_html_e( $form->ID, ); ?>']</td>
235
  <td><?php echo get_the_date( 'l, F j, Y', $form->ID ); ?></td>
236
  <td class="wp_smf_options_width">
237
  <a id="slr_edit_form" href="#">
239
  </a>/
240
  <a id="slr_delete_form" href="#">
241
 
242
+ <img alt="Delete" class="wp_smf_delete_img" data-id="<?php echo esc_attr( $form->ID ) ?>" src="<?php echo smuzform_admin_asset( 'img/wp_smf_delete_form_img.png' ) ?>" />
243
  </a>
244
 
245
  </td>
admin/views/notification/backbone/collection.php CHANGED
@@ -54,7 +54,7 @@
54
  <label class="control-label inlineLabel" for="emailSenderAddress"><?php smuzform_translate_e( 'Send Email To' ) ?></label>
55
 
56
  <% if ( extraData.emailAddress == '' ) { %>
57
- <input id="emailSenderAddress" type="text" class="form-control inlineField" value="<?php echo get_option('admin_email') ?>" />
58
  <% } else { %>
59
  <input id="emailSenderAddress" type="text" class="form-control inlineField" value="<%= extraData.emailAddress %>" />
60
  <% } %>
54
  <label class="control-label inlineLabel" for="emailSenderAddress"><?php smuzform_translate_e( 'Send Email To' ) ?></label>
55
 
56
  <% if ( extraData.emailAddress == '' ) { %>
57
+ <input id="emailSenderAddress" type="text" class="form-control inlineField" value="<?php echo sanitize_text_field( get_option('admin_email') ); ?>" />
58
  <% } else { %>
59
  <input id="emailSenderAddress" type="text" class="form-control inlineField" value="<%= extraData.emailAddress %>" />
60
  <% } %>
admin/views/notification/confirmation-email/html-message.php CHANGED
@@ -64,7 +64,7 @@ background-color: #f6f6f6;
64
  <div class="content" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;">
65
  <table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;" bgcolor="#fff"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
66
  <meta itemprop="name" content="Confirm Email" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;" /><table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
67
- <?php echo $message; ?>
68
  </td>
69
  </tr></table></td>
70
  </tr></table><div class="footer" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
64
  <div class="content" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;">
65
  <table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;" bgcolor="#fff"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
66
  <meta itemprop="name" content="Confirm Email" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;" /><table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
67
+ <?php echo esc_html( $message ); ?>
68
  </td>
69
  </tr></table></td>
70
  </tr></table><div class="footer" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
admin/views/notification/emails/html/html-message.php CHANGED
@@ -64,7 +64,7 @@ background-color: #f6f6f6;
64
  <div class="content" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;">
65
  <table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;" bgcolor="#fff"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
66
  <meta itemprop="name" content="Confirm Email" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;" /><table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
67
- <?php echo $message; ?>
68
  </td>
69
  </tr><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-block" itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
70
  <a href="<?php echo admin_url( 'admin.php?page=smuz-forms-entry&form_id='.intval($this->getId()).'&entry_id='.intval($entry_id ) ) ?>" class="btn-primary" itemprop="url" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #348eda; margin: 0; border-color: #348eda; border-style: solid; border-width: 10px 20px;"><?php echo smuzform_translate_e( 'View Entry' ) ?></a>
64
  <div class="content" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;">
65
  <table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;" bgcolor="#fff"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
66
  <meta itemprop="name" content="Confirm Email" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;" /><table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
67
+ <?php echo esc_html( $message ); ?>
68
  </td>
69
  </tr><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-block" itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
70
  <a href="<?php echo admin_url( 'admin.php?page=smuz-forms-entry&form_id='.intval($this->getId()).'&entry_id='.intval($entry_id ) ) ?>" class="btn-primary" itemprop="url" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #348eda; margin: 0; border-color: #348eda; border-style: solid; border-width: 10px 20px;"><?php echo smuzform_translate_e( 'View Entry' ) ?></a>
admin/views/notification/emails/single.php CHANGED
@@ -4,7 +4,7 @@ if ( ! is_array( $field['value'] ) ) {
4
 
5
  $value = esc_attr( $field['value'] );
6
 
7
- echo $value;
8
 
9
  }
10
 
4
 
5
  $value = esc_attr( $field['value'] );
6
 
7
+ echo esc_html($value);
8
 
9
  }
10
 
admin/views/notification/settings-page.php CHANGED
@@ -9,7 +9,7 @@
9
 
10
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
11
  <li class="navBarActionsLi">
12
- <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.intval($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Form Builder <' ) ?></a>
13
  </li>
14
  </ul>
15
 
9
 
10
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
11
  <li class="navBarActionsLi">
12
+ <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.sanitize_text_field($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Form Builder <' ) ?></a>
13
  </li>
14
  </ul>
15
 
admin/views/settings-page.php CHANGED
@@ -70,10 +70,10 @@
70
  <p id="serverModalMessage"></p>
71
  </div>
72
 
73
- <?php if ( isset( $_GET['form_id'] ) ): $form_id = intval( $_GET['form_id'] ) ?>
74
 
75
  <?php if ( get_post_status( $form_id ) === 'publish' ): ?>
76
- <script> window.smuz_formid = <?php echo $form_id ?>; </script>
77
  <?php endif; ?>
78
 
79
  <?php endif; ?>
70
  <p id="serverModalMessage"></p>
71
  </div>
72
 
73
+ <?php if ( isset( $_GET['form_id'] ) ): $form_id = sanitize_text_field( $_GET['form_id'] ); ?>
74
 
75
  <?php if ( get_post_status( $form_id ) === 'publish' ): ?>
76
+ <script> window.smuz_formid = <?php echo esc_html($form_id); ?>; </script>
77
  <?php endif; ?>
78
 
79
  <?php endif; ?>
admin/views/style/settings-page.php CHANGED
@@ -9,7 +9,7 @@
9
 
10
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
11
  <li class="navBarActionsLi">
12
- <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.intval($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Form Builder <' ) ?></a>
13
  </li>
14
  </ul>
15
 
9
 
10
  <ul class="nav navbar-nav navbar-right" id="navBarActionsCont">
11
  <li class="navBarActionsLi">
12
+ <a id="formEntriesAction" href="<?php echo admin_url( 'admin.php?page=smuz-forms&form_id='.sanitize_text_field($_GET['form_id']) ); ?>"><?php smuzform_translate_e( 'Go Back to Form Builder <' ) ?></a>
13
  </li>
14
  </ul>
15
 
forms.php CHANGED
@@ -5,7 +5,7 @@ Description: Create Responsive Forms using Drag & Drop Visual Builder. View entr
5
  Author: Web-Settler
6
  Author URI: https://web-settler.com/form-builder/?ref=author_uri
7
  Plugin URI: https://web-settler.com/form-builder/?ref=plugin_uri
8
- Version: 1.9.8.3
9
  License: GPL V2+
10
  **/
11
 
5
  Author: Web-Settler
6
  Author URI: https://web-settler.com/form-builder/?ref=author_uri
7
  Plugin URI: https://web-settler.com/form-builder/?ref=plugin_uri
8
+ Version: 1.9.8.4
9
  License: GPL V2+
10
  **/
11
 
public/core/class/class-smuzform-public-storage.php CHANGED
@@ -20,13 +20,13 @@ class SmuzForm_Public_Storage {
20
 
21
  function api() {
22
 
23
- $form_id = intval( $_GET['formId'] );
24
 
25
  $this->preCheckup( $form_id );
26
 
27
- $method = $_GET['method'];
28
 
29
- if ( isset( $_GET['use'] ) || $_GET['use'] == 'ajax' )
30
  $useAjax = true;
31
  else
32
  $useAjax = false;
@@ -264,9 +264,9 @@ class SmuzForm_Public_Storage {
264
 
265
  $errors = array();
266
 
267
- $returnLink = $_POST['_returnLink'];
268
 
269
- $untrustedData = $_POST['smFieldData'];
270
 
271
  $trustedData = $this->filterFormFields( $untrustedData, $form );
272
 
@@ -341,9 +341,9 @@ class SmuzForm_Public_Storage {
341
 
342
  $errors = array();
343
 
344
- $returnLink = $_POST['_returnLink'];
345
 
346
- $untrustedData = $_POST['smFieldData'];
347
 
348
  $trustedData = $this->filterFormFields( $untrustedData, $form );
349
 
@@ -533,7 +533,7 @@ class SmuzForm_Public_Storage {
533
  if ( ! $this->formExist( $form_id ) )
534
  die();
535
 
536
- $_REQUEST['_ajax_nonce'] = $_GET['nonce'];
537
 
538
  check_ajax_referer( 'smuzform-storage-ajax-referer' );
539
 
20
 
21
  function api() {
22
 
23
+ $form_id = sanitize_text_field( $_GET['formId'] );
24
 
25
  $this->preCheckup( $form_id );
26
 
27
+ $method = sanitize_text_field( $_GET['method'] );
28
 
29
+ if ( isset( $_GET['use'] ) || sanitize_text_field($_GET['use']) == 'ajax' )
30
  $useAjax = true;
31
  else
32
  $useAjax = false;
264
 
265
  $errors = array();
266
 
267
+ $returnLink = sanitize_text_field( $_POST['_returnLink'] );
268
 
269
+ $untrustedData = sanitize_text_field($_POST['smFieldData']);
270
 
271
  $trustedData = $this->filterFormFields( $untrustedData, $form );
272
 
341
 
342
  $errors = array();
343
 
344
+ $returnLink = sanitize_text_field($_POST['_returnLink']);
345
 
346
+ $untrustedData = sanitize_text_field($_POST['smFieldData']);
347
 
348
  $trustedData = $this->filterFormFields( $untrustedData, $form );
349
 
533
  if ( ! $this->formExist( $form_id ) )
534
  die();
535
 
536
+ $_REQUEST['_ajax_nonce'] = sanitize_text_field($_GET['nonce']);
537
 
538
  check_ajax_referer( 'smuzform-storage-ajax-referer' );
539
 
public/core/class/class-smuzform-public.php CHANGED
@@ -72,7 +72,7 @@ class SmuzForm_Public {
72
 
73
  } catch (Exception $e) {
74
 
75
- echo $e->getMessage() . "<br />";
76
 
77
  }
78
 
72
 
73
  } catch (Exception $e) {
74
 
75
+ echo esc_html( $e->getMessage() ) . "<br />";
76
 
77
  }
78
 
public/views/form/html-submit-view.php CHANGED
@@ -37,8 +37,8 @@
37
  <?php foreach( $errors as $err ): ?>
38
 
39
  <li>
40
- <strong><?php echo $err['additionalData']['fieldLabel'] ?>: </strong>
41
- <span class="errorMsg"><?php echo $err['message'] ?></span>
42
  </li>
43
 
44
  <?php endforeach; ?>
@@ -49,7 +49,7 @@
49
  <footer>
50
 
51
  <div id="backBtnCont">
52
- <a class="button button-primary" href="<?php echo $returnLink ?>"><?php smuzform_translate_e( 'Go Back' ) ?></a>
53
  <small>
54
  <?php smuzform_translate_e( '' ) ?>
55
  </small>
37
  <?php foreach( $errors as $err ): ?>
38
 
39
  <li>
40
+ <strong><?php echo esc_html($err['additionalData']['fieldLabel']); ?>: </strong>
41
+ <span class="errorMsg"><?php echo esc_html($err['message']) ?></span>
42
  </li>
43
 
44
  <?php endforeach; ?>
49
  <footer>
50
 
51
  <div id="backBtnCont">
52
+ <a class="button button-primary" href="<?php echo esc_url($returnLink); ?>"><?php smuzform_translate_e( 'Go Back' ) ?></a>
53
  <small>
54
  <?php smuzform_translate_e( '' ) ?>
55
  </small>
public/views/form/multipage/render-fields.php CHANGED
@@ -1,33 +1,33 @@
1
- <div class="smform-fieldcont smform-fieldcont<?php echo $type ?>" id="smform-fieldcont<?php echo $key ?>"
2
- data-key="smform-field<?php echo $form->getId() . $key ?>"
3
  data-rule="<?php echo ( $ruleEnabled ) ? 'enabled': 'disabled' ?>"
4
- data-ruleoperator="<?php echo $rules['operator'] ?>"
5
- data-ruleaction="<?php echo $rules['action'] ?>"
6
- data-rulecmpvalue="<?php echo $rules['cmpValue'] ?>"
7
- data-rulefield="<?php echo $rules['field'] ?>" >
8
 
9
  <?php do_action( 'smuzform_showfield_start', $field, $form->getId() ) ?>
10
 
11
  <?php if ( $type == 'singletext' ): ?>
12
 
13
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
14
 
15
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
16
  value="<?php esc_attr_e($preValue) ?>"
17
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
18
- class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
19
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="text" />
20
 
21
  <?php endif; ?>
22
 
23
  <?php if ( $type == 'number' ): ?>
24
 
25
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
26
 
27
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
28
  value="<?php esc_attr_e($preValue) ?>"
29
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
30
- class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
31
  type="text" <?php echo ( $required ) ? 'required ': '' ?>
32
  data-type="number" />
33
 
@@ -35,11 +35,11 @@
35
 
36
  <?php if ( $type == 'textarea' ): ?>
37
 
38
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
39
 
40
- <textarea name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
41
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
42
- class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?> smform-control smform-controllabelpostextarea"
43
  <?php echo ( $required ) ? 'required ': '' ?>
44
  data-type="textarea"
45
  ><?php echo esc_html($preValue) ?></textarea>
@@ -48,10 +48,10 @@
48
 
49
  <?php if ( $type == 'dropdown' ): ?>
50
 
51
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
52
 
53
- <select name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
54
- class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
55
  <?php echo ( $required ) ? 'required ': '' ?>
56
  data-type="select" >
57
 
@@ -67,12 +67,12 @@
67
 
68
  <?php if ( $type == 'radio' ): ?>
69
 
70
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
71
 
72
  <?php foreach ( $choices as $choicekey => $choice ): ?>
73
 
74
  <div class="smform-control smform-controllabelpos-radio radio">
75
- <label><input name="smFieldData[<?php echo $cssID ?>]" type="radio" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="radio" /> <?php echo esc_html( $choice ) ?></label>
76
  </div>
77
 
78
  <?php endforeach; ?>
@@ -81,12 +81,12 @@
81
 
82
  <?php if ( $type == 'checkbox' ): ?>
83
 
84
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
85
 
86
  <?php foreach ( $choices as $choicekey => $choice ): ?>
87
 
88
  <div class="smform-control smform-controllabelpos-radio checkbox">
89
- <label><input name="smFieldData[<?php echo $cssID ?>][checkbox][]" type="checkbox" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="checkbox" /> <?php echo esc_html( $choice ) ?></label>
90
  </div>
91
 
92
  <?php endforeach; ?>
1
+ <div class="smform-fieldcont smform-fieldcont<?php echo esc_attr( $type ); ?>" id="smform-fieldcont<?php echo esc_attr( $key ); ?>"
2
+ data-key="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
3
  data-rule="<?php echo ( $ruleEnabled ) ? 'enabled': 'disabled' ?>"
4
+ data-ruleoperator="<?php echo esc_attr( $rules['operator'] ); ?>"
5
+ data-ruleaction="<?php echo esc_attr( $rules['action'] ); ?>"
6
+ data-rulecmpvalue="<?php echo esc_attr( $rules['cmpValue'] ); ?>"
7
+ data-rulefield="<?php echo esc_attr( $rules['field'] ); ?>" >
8
 
9
  <?php do_action( 'smuzform_showfield_start', $field, $form->getId() ) ?>
10
 
11
  <?php if ( $type == 'singletext' ): ?>
12
 
13
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
14
 
15
+ <input name="smFieldData[<?php echo esc_attr( $cssID ); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
16
  value="<?php esc_attr_e($preValue) ?>"
17
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
18
+ class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
19
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="text" />
20
 
21
  <?php endif; ?>
22
 
23
  <?php if ( $type == 'number' ): ?>
24
 
25
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
26
 
27
+ <input name="smFieldData[<?php echo esc_attr( $cssID ); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
28
  value="<?php esc_attr_e($preValue) ?>"
29
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
30
+ class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
31
  type="text" <?php echo ( $required ) ? 'required ': '' ?>
32
  data-type="number" />
33
 
35
 
36
  <?php if ( $type == 'textarea' ): ?>
37
 
38
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
39
 
40
+ <textarea name="smFieldData[<?php echo esc_attr( $cssID ); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
41
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
42
+ class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?> smform-control smform-controllabelpostextarea"
43
  <?php echo ( $required ) ? 'required ': '' ?>
44
  data-type="textarea"
45
  ><?php echo esc_html($preValue) ?></textarea>
48
 
49
  <?php if ( $type == 'dropdown' ): ?>
50
 
51
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
52
 
53
+ <select name="smFieldData[<?php echo esc_attr( $cssID ); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
54
+ class="smform-control smform-controllabelpos <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
55
  <?php echo ( $required ) ? 'required ': '' ?>
56
  data-type="select" >
57
 
67
 
68
  <?php if ( $type == 'radio' ): ?>
69
 
70
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
71
 
72
  <?php foreach ( $choices as $choicekey => $choice ): ?>
73
 
74
  <div class="smform-control smform-controllabelpos-radio radio">
75
+ <label><input name="smFieldData[<?php echo esc_attr( $cssID ); ?>]" type="radio" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="radio" /> <?php echo esc_html( $choice ) ?></label>
76
  </div>
77
 
78
  <?php endforeach; ?>
81
 
82
  <?php if ( $type == 'checkbox' ): ?>
83
 
84
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
85
 
86
  <?php foreach ( $choices as $choicekey => $choice ): ?>
87
 
88
  <div class="smform-control smform-controllabelpos-radio checkbox">
89
+ <label><input name="smFieldData[<?php echo esc_attr( $cssID ); ?>][checkbox][]" type="checkbox" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="checkbox" /> <?php echo esc_html( $choice ) ?></label>
90
  </div>
91
 
92
  <?php endforeach; ?>
public/views/form/multipage/render.php CHANGED
@@ -19,7 +19,7 @@
19
  <ul class="smform-multipage-steps">
20
  <?php foreach ( $form->getMultiPageFields() as $key => $page ): ?>
21
 
22
- <li class="smform-multipage-step <?php echo ( $key === 0 ) ? 'active': '' ?>" data-page="<?php echo $key ?>">
23
 
24
  <strong><?php echo esc_html( $form->getPageTitle( $key ) ) ?></strong>
25
 
@@ -34,7 +34,7 @@
34
 
35
  <?php foreach ( $form->getMultiPageFields() as $page_id => $page ): ?>
36
 
37
- <div class="smformpage smformpage<?php echo $page_id ?>">
38
 
39
  <?php foreach ( $page['fields'] as $key => $field ): extract( $field, EXTR_OVERWRITE ); $key = $key + $page_id ?>
40
  <?php include smuzform_public_view( 'form/multipage/render-fields.php' ) ?>
19
  <ul class="smform-multipage-steps">
20
  <?php foreach ( $form->getMultiPageFields() as $key => $page ): ?>
21
 
22
+ <li class="smform-multipage-step <?php echo ( $key === 0 ) ? 'active': '' ?>" data-page="<?php echo esc_attr( $key ); ?>">
23
 
24
  <strong><?php echo esc_html( $form->getPageTitle( $key ) ) ?></strong>
25
 
34
 
35
  <?php foreach ( $form->getMultiPageFields() as $page_id => $page ): ?>
36
 
37
+ <div class="smformpage smformpage<?php echo esc_attr( $page_id ); ?>">
38
 
39
  <?php foreach ( $page['fields'] as $key => $field ): extract( $field, EXTR_OVERWRITE ); $key = $key + $page_id ?>
40
  <?php include smuzform_public_view( 'form/multipage/render-fields.php' ) ?>
public/views/form/render-advanced-fields.php CHANGED
@@ -1,25 +1,25 @@
1
  <?php if ( $type == 'fileupload' ): ?>
2
 
3
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
4
 
5
- <input name="<?php echo $cssID ?>" id="smform-field<?php echo $form->getId() . $key ?>"
6
- class="smform-controllabelpos smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
7
  type="file" <?php echo ( $required ) ? 'required ': '' ?> date-type="fileupload" />
8
 
9
  <?php endif; ?>
10
 
11
  <?php if ( $type == 'name' ): ?>
12
 
13
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
14
  <div class="smFormInlineFormCont">
15
  <div class="smInlineForm">
16
  <span>
17
- <label><input name="smFieldData[<?php echo $cssID ?>][name][firstName]" id="smform-fieldfname<?php echo $form->getId() . $key ?>"
18
- class="smFieldFirstName smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
19
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> First</label></span>
20
 
21
- <span><label><input name="smFieldData[<?php echo $cssID ?>][name][lastName]" id="smform-fieldlname<?php echo $form->getId() . $key ?>"
22
- class="smFieldLastName smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
23
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> Last</label></span>
24
  </div>
25
  </div>
@@ -29,12 +29,12 @@
29
 
30
  <?php if ( $type == 'email' ): ?>
31
 
32
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
33
 
34
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
35
  value="<?php esc_attr_e($preValue) ?>"
36
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
37
- class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
38
  type="email" <?php echo ( $required ) ? 'required ': '' ?> date-type="email" />
39
 
40
  <?php endif; ?>
@@ -49,24 +49,24 @@ if ( is_array( $_tmpdate ) && ! empty( $preValue ) )
49
 
50
  ?>
51
 
52
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
53
 
54
  <div class="smFormInlineFormCont">
55
  <div class="smInlineForm smInlineFormDate">
56
  <span>
57
- <label><input name="smFieldData[<?php echo $cssID ?>][date][dd]" id="smform-field-yyyy<?php echo $form->getId() . $key ?>"
58
  value="<?php esc_attr_e($_date['dd']) ?>"
59
- class="smFieldDD smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
60
  type="number" <?php echo ( $required ) ? 'required ': '' ?> date-type="date" min="1" max="31" /> DD</label></span>
61
 
62
- <span><label><input name="smFieldData[<?php echo $cssID ?>][date][mm]" id="smform-field-mm<?php echo $form->getId() . $key ?>"
63
  value="<?php esc_attr_e($_date['mm']) ?>"
64
- class="smFieldMM smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
65
  type="number" <?php echo ( $required ) ? 'required ': '' ?> date-type="date" min="1" max="12" /> MM</label></span>
66
 
67
- <span><label><input name="smFieldData[<?php echo $cssID ?>][date][yyyy]" id="smform-field-yyyy<?php echo $form->getId() . $key ?>"
68
  value="<?php esc_attr_e($_date['yyyy']) ?>"
69
- class="smFieldDD smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
70
  type="number" <?php echo ( $required ) ? 'required ': '' ?> date-type="date" min="1" max="9999" /> YYYY</label></span>
71
  </div>
72
  </div>
@@ -76,30 +76,30 @@ if ( is_array( $_tmpdate ) && ! empty( $preValue ) )
76
 
77
  <?php if ( $type == 'address' ): ?>
78
 
79
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
80
 
81
  <div class="smFormInlineFormCont">
82
 
83
- <div class="smFormAddressMargin"><label><input name="smFieldData[<?php echo $cssID ?>][address][streetAddress]" id="smform-fieldstreetaddress<?php echo $form->getId() . $key ?>"
84
  value=""
85
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
86
- class="smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
87
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="email" />Street Address</label> </div>
88
 
89
- <div class="smFormAddressMargin"><label><input name="smFieldData[<?php echo $cssID ?>][address][streetAddress2]" id="smform-fieldaddress2<?php echo $form->getId() . $key ?>"
90
  value=""
91
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
92
- class="smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
93
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="email" />Address 2</label></div>
94
 
95
  <div class="smInlineForm smInlineFormAddress">
96
  <span>
97
- <label><input name="smFieldData[<?php echo $cssID ?>][address][city]" id="smform-fieldcity<?php echo $form->getId() . $key ?>"
98
- class="smFieldCity smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
99
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> City</label></span>
100
 
101
- <span><label><input name="smFieldData[<?php echo $cssID ?>][address][state]" id="smform-fieldstate<?php echo $form->getId() . $key ?>"
102
- class="smFieldState smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
103
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> State / Province</label></span>
104
  </div>
105
 
@@ -107,12 +107,12 @@ if ( is_array( $_tmpdate ) && ! empty( $preValue ) )
107
 
108
  <div class="smInlineForm smInlineFormAddress">
109
  <span>
110
- <label><input name="smFieldData[<?php echo $cssID ?>][address][zip]" id="smform-fieldzip<?php echo $form->getId() . $key ?>"
111
- class="smFieldZip smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
112
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> Postal / Zip Code</label></span>
113
 
114
- <span><label><select name="smFieldData[<?php echo $cssID ?>][address][country]" id="smform-fieldcountry<?php echo $form->getId() . $key ?>"
115
- class="smFieldCountry smform-control smform-field-size<?php echo $size ?> <?php echo ( $required ) ? 'required ': '' ?>"
116
  <?php echo ( $required ) ? 'required ': '' ?> date-type="address" /><?php include smuzform_public_view( 'form/select-county-list.php' ) ?></select> Country</label></span>
117
  </div>
118
  </div>
@@ -122,32 +122,32 @@ if ( is_array( $_tmpdate ) && ! empty( $preValue ) )
122
 
123
  <?php if ( $type == 'phone' ): ?>
124
 
125
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
126
 
127
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
128
  value="<?php esc_attr_e($preValue) ?>"
129
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
130
- class="smform-controllabelpos smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
131
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="phone" />
132
 
133
  <?php endif; ?>
134
 
135
  <?php if ( $type == 'website' ): ?>
136
 
137
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
138
 
139
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
140
  value="<?php esc_attr_e($preValue) ?>"
141
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
142
- class="smform-controllabelpos smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
143
  type="url" <?php echo ( $required ) ? 'required ': '' ?> date-type="phone" />
144
 
145
  <?php endif; ?>
146
 
147
  <?php if ( $type == 'pagebreak' ): ?>
148
 
149
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
150
 
151
- <div id="smform-field<?php echo $form->getId() . $key ?>"></div>
152
 
153
  <?php endif; ?>
1
  <?php if ( $type == 'fileupload' ): ?>
2
 
3
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
4
 
5
+ <input name="<?php echo esc_attr($cssID); ?>" id="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
6
+ class="smform-controllabelpos smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
7
  type="file" <?php echo ( $required ) ? 'required ': '' ?> date-type="fileupload" />
8
 
9
  <?php endif; ?>
10
 
11
  <?php if ( $type == 'name' ): ?>
12
 
13
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
14
  <div class="smFormInlineFormCont">
15
  <div class="smInlineForm">
16
  <span>
17
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][name][firstName]" id="smform-fieldfname<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
18
+ class="smFieldFirstName smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
19
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> First</label></span>
20
 
21
+ <span><label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][name][lastName]" id="smform-fieldlname<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
22
+ class="smFieldLastName smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
23
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> Last</label></span>
24
  </div>
25
  </div>
29
 
30
  <?php if ( $type == 'email' ): ?>
31
 
32
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
33
 
34
+ <input name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
35
  value="<?php esc_attr_e($preValue) ?>"
36
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
37
+ class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
38
  type="email" <?php echo ( $required ) ? 'required ': '' ?> date-type="email" />
39
 
40
  <?php endif; ?>
49
 
50
  ?>
51
 
52
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
53
 
54
  <div class="smFormInlineFormCont">
55
  <div class="smInlineForm smInlineFormDate">
56
  <span>
57
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][date][dd]" id="smform-field-yyyy<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
58
  value="<?php esc_attr_e($_date['dd']) ?>"
59
+ class="smFieldDD smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
60
  type="number" <?php echo ( $required ) ? 'required ': '' ?> date-type="date" min="1" max="31" /> DD</label></span>
61
 
62
+ <span><label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][date][mm]" id="smform-field-mm<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
63
  value="<?php esc_attr_e($_date['mm']) ?>"
64
+ class="smFieldMM smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
65
  type="number" <?php echo ( $required ) ? 'required ': '' ?> date-type="date" min="1" max="12" /> MM</label></span>
66
 
67
+ <span><label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][date][yyyy]" id="smform-field-yyyy<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
68
  value="<?php esc_attr_e($_date['yyyy']) ?>"
69
+ class="smFieldDD smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
70
  type="number" <?php echo ( $required ) ? 'required ': '' ?> date-type="date" min="1" max="9999" /> YYYY</label></span>
71
  </div>
72
  </div>
76
 
77
  <?php if ( $type == 'address' ): ?>
78
 
79
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
80
 
81
  <div class="smFormInlineFormCont">
82
 
83
+ <div class="smFormAddressMargin"><label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][address][streetAddress]" id="smform-fieldstreetaddress<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
84
  value=""
85
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
86
+ class="smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
87
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="email" />Street Address</label> </div>
88
 
89
+ <div class="smFormAddressMargin"><label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][address][streetAddress2]" id="smform-fieldaddress2<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
90
  value=""
91
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
92
+ class="smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
93
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="email" />Address 2</label></div>
94
 
95
  <div class="smInlineForm smInlineFormAddress">
96
  <span>
97
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][address][city]" id="smform-fieldcity<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
98
+ class="smFieldCity smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
99
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> City</label></span>
100
 
101
+ <span><label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][address][state]" id="smform-fieldstate<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
102
+ class="smFieldState smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
103
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> State / Province</label></span>
104
  </div>
105
 
107
 
108
  <div class="smInlineForm smInlineFormAddress">
109
  <span>
110
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][address][zip]" id="smform-fieldzip<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
111
+ class="smFieldZip smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
112
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="name" /> Postal / Zip Code</label></span>
113
 
114
+ <span><label><select name="smFieldData[<?php echo esc_attr($cssID); ?>][address][country]" id="smform-fieldcountry<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
115
+ class="smFieldCountry smform-control smform-field-size<?php echo esc_attr( $size ); ?> <?php echo ( $required ) ? 'required ': '' ?>"
116
  <?php echo ( $required ) ? 'required ': '' ?> date-type="address" /><?php include smuzform_public_view( 'form/select-county-list.php' ) ?></select> Country</label></span>
117
  </div>
118
  </div>
122
 
123
  <?php if ( $type == 'phone' ): ?>
124
 
125
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
126
 
127
+ <input name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
128
  value="<?php esc_attr_e($preValue) ?>"
129
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
130
+ class="smform-controllabelpos smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
131
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="phone" />
132
 
133
  <?php endif; ?>
134
 
135
  <?php if ( $type == 'website' ): ?>
136
 
137
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
138
 
139
+ <input name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"
140
  value="<?php esc_attr_e($preValue) ?>"
141
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
142
+ class="smform-controllabelpos smform-control <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
143
  type="url" <?php echo ( $required ) ? 'required ': '' ?> date-type="phone" />
144
 
145
  <?php endif; ?>
146
 
147
  <?php if ( $type == 'pagebreak' ): ?>
148
 
149
+ <label for="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
150
 
151
+ <div id="smform-field<?php echo esc_attr( $form->getId() ) . esc_attr($key); ?>"></div>
152
 
153
  <?php endif; ?>
public/views/form/render-html-fields.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php if ( $type === 'customText' || $type === 'customImage' || $type === 'customHtml' || $type === 'customLink' ): ?>
2
 
3
  <div class="smHtmlElementFieldCont">
4
- <?php echo $field['extraData']['readyHtml'] ?>
5
  </div>
6
 
7
  <?php endif; ?>
1
  <?php if ( $type === 'customText' || $type === 'customImage' || $type === 'customHtml' || $type === 'customLink' ): ?>
2
 
3
  <div class="smHtmlElementFieldCont">
4
+ <?php echo esc_html( $field['extraData']['readyHtml'] ); ?>
5
  </div>
6
 
7
  <?php endif; ?>
public/views/form/render-no-script.php CHANGED
@@ -13,31 +13,31 @@
13
  <?php foreach( $form->getFields() as $key => $field ): extract( $field, EXTR_OVERWRITE ); ?>
14
 
15
 
16
- <div class="smform-fieldcont smform-fieldcont<?php echo $type ?>" id="smform-fieldcont<?php echo $key ?>"
17
  data-rule="<?php echo ( $ruleEnabled ) ? 'enabled ': 'disabled' ?>" >
18
 
19
  <?php do_action( 'smuzform_showfield_start', $field, $form->getId() ) ?>
20
 
21
  <?php if ( $type == 'singletext' ): ?>
22
 
23
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
24
 
25
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
26
  value="<?php esc_attr_e($preValue) ?>"
27
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
28
- class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
29
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="text" />
30
 
31
  <?php endif; ?>
32
 
33
  <?php if ( $type == 'number' ): ?>
34
 
35
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
36
 
37
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
38
  value="<?php esc_attr_e($preValue) ?>"
39
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
40
- class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
41
  type="text" <?php echo ( $required ) ? 'required ': '' ?>
42
  data-type="number" />
43
 
@@ -45,11 +45,11 @@
45
 
46
  <?php if ( $type == 'textarea' ): ?>
47
 
48
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
49
 
50
- <textarea name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
51
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
52
- class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?> smform-controltextarea"
53
  <?php echo ( $required ) ? 'required ': '' ?>
54
  data-type="textarea"
55
  ><?php echo esc_html($preValue) ?></textarea>
@@ -58,10 +58,10 @@
58
 
59
  <?php if ( $type == 'dropdown' ): ?>
60
 
61
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
62
 
63
- <select name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
64
- class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
65
  <?php echo ( $required ) ? 'required ': '' ?>
66
  data-type="select" >
67
 
@@ -77,12 +77,12 @@
77
 
78
  <?php if ( $type == 'radio' ): ?>
79
 
80
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
81
 
82
  <?php foreach ( $choices as $choicekey => $choice ): ?>
83
 
84
  <div class="smform-control-radio radio">
85
- <label><input name="smFieldData[<?php echo $cssID ?>]" type="radio" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="radio" /> <?php echo esc_html( $choice ) ?></label>
86
  </div>
87
 
88
  <?php endforeach; ?>
@@ -93,12 +93,12 @@
93
 
94
  <?php if ( $type == 'checkbox' ): ?>
95
 
96
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
97
 
98
  <?php foreach ( $choices as $choicekey => $choice ): ?>
99
 
100
  <div class="smform-control-radio checkbox">
101
- <label><input name="smFieldData[<?php echo $cssID ?>][checkbox][]" type="checkbox" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="checkbox" /> <?php echo esc_html( $choice ) ?></label>
102
  </div>
103
 
104
  <?php endforeach; ?>
13
  <?php foreach( $form->getFields() as $key => $field ): extract( $field, EXTR_OVERWRITE ); ?>
14
 
15
 
16
+ <div class="smform-fieldcont smform-fieldcont<?php echo esc_attr( $type ); ?>" id="smform-fieldcont<?php echo esc_attr( $key ); ?>"
17
  data-rule="<?php echo ( $ruleEnabled ) ? 'enabled ': 'disabled' ?>" >
18
 
19
  <?php do_action( 'smuzform_showfield_start', $field, $form->getId() ) ?>
20
 
21
  <?php if ( $type == 'singletext' ): ?>
22
 
23
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
24
 
25
+ <input name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
26
  value="<?php esc_attr_e($preValue) ?>"
27
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
28
+ class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
29
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="text" />
30
 
31
  <?php endif; ?>
32
 
33
  <?php if ( $type == 'number' ): ?>
34
 
35
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
36
 
37
+ <input name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
38
  value="<?php esc_attr_e($preValue) ?>"
39
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
40
+ class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
41
  type="text" <?php echo ( $required ) ? 'required ': '' ?>
42
  data-type="number" />
43
 
45
 
46
  <?php if ( $type == 'textarea' ): ?>
47
 
48
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
49
 
50
+ <textarea name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
51
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
52
+ class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?> smform-controltextarea"
53
  <?php echo ( $required ) ? 'required ': '' ?>
54
  data-type="textarea"
55
  ><?php echo esc_html($preValue) ?></textarea>
58
 
59
  <?php if ( $type == 'dropdown' ): ?>
60
 
61
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
62
 
63
+ <select name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
64
+ class="smform-control <?php esc_attr_e( $cssClasses ); echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
65
  <?php echo ( $required ) ? 'required ': '' ?>
66
  data-type="select" >
67
 
77
 
78
  <?php if ( $type == 'radio' ): ?>
79
 
80
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
81
 
82
  <?php foreach ( $choices as $choicekey => $choice ): ?>
83
 
84
  <div class="smform-control-radio radio">
85
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>]" type="radio" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="radio" /> <?php echo esc_html( $choice ) ?></label>
86
  </div>
87
 
88
  <?php endforeach; ?>
93
 
94
  <?php if ( $type == 'checkbox' ): ?>
95
 
96
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
97
 
98
  <?php foreach ( $choices as $choicekey => $choice ): ?>
99
 
100
  <div class="smform-control-radio checkbox">
101
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][checkbox][]" type="checkbox" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="checkbox" /> <?php echo esc_html( $choice ) ?></label>
102
  </div>
103
 
104
  <?php endforeach; ?>
public/views/form/render.php CHANGED
@@ -18,36 +18,36 @@
18
  <?php foreach( $form->getFields() as $key => $field ): extract( $field, EXTR_OVERWRITE ); ?>
19
 
20
 
21
- <div class="smform-fieldcont smform-fieldcont<?php echo $type ?> <?php esc_attr_e( $cssClasses ) ?>" id="smform-fieldcont<?php echo $form->getId() . $key ?>"
22
- data-key="smform-field<?php echo $form->getId() . $key ?>"
23
  data-rule="<?php echo ( $ruleEnabled ) ? 'enabled': 'disabled' ?>"
24
- data-ruleoperator="<?php echo $rules['operator'] ?>"
25
- data-ruleaction="<?php echo $rules['action'] ?>"
26
- data-rulecmpvalue="<?php echo $rules['cmpValue'] ?>"
27
- data-rulefield="<?php echo $rules['field'] ?>" >
28
 
29
  <?php do_action( 'smuzform_showfield_start', $field, $form->getId() ) ?>
30
 
31
  <?php if ( $type == 'singletext' ): ?>
32
 
33
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
34
 
35
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
36
  value="<?php esc_attr_e($preValue) ?>"
37
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
38
- class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
39
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="text" />
40
 
41
  <?php endif; ?>
42
 
43
  <?php if ( $type == 'number' ): ?>
44
 
45
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
46
 
47
- <input name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
48
  value="<?php esc_attr_e($preValue) ?>"
49
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
50
- class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
51
  type="text" <?php echo ( $required ) ? 'required ': '' ?>
52
  data-type="number" />
53
 
@@ -55,11 +55,11 @@
55
 
56
  <?php if ( $type == 'textarea' ): ?>
57
 
58
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
59
 
60
- <textarea name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
61
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
62
- class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?> smform-control smform-controllabelpostextarea"
63
  <?php echo ( $required ) ? 'required ': '' ?>
64
  data-type="textarea"
65
  ><?php echo esc_html($preValue) ?></textarea>
@@ -68,10 +68,10 @@
68
 
69
  <?php if ( $type == 'dropdown' ): ?>
70
 
71
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
72
 
73
- <select name="smFieldData[<?php echo $cssID ?>]" id="smform-field<?php echo $form->getId() . $key ?>"
74
- class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo $size ?>"
75
  <?php echo ( $required ) ? 'required ': '' ?>
76
  data-type="select" >
77
 
@@ -87,13 +87,13 @@
87
 
88
  <?php if ( $type == 'radio' ): ?>
89
 
90
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
91
 
92
  <div class="smform-radio-cont">
93
  <?php foreach ( $choices as $choicekey => $choice ): ?>
94
 
95
  <div class="smform-control smform-controllabelpos-radio radio">
96
- <label><input name="smFieldData[<?php echo $cssID ?>]" type="radio" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="radio" /> <?php echo esc_html( $choice ) ?></label>
97
  </div>
98
 
99
  <?php endforeach; ?>
@@ -103,13 +103,13 @@
103
 
104
  <?php if ( $type == 'checkbox' ): ?>
105
 
106
- <label for="smform-field<?php echo $form->getId() . $key ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
107
 
108
  <div class="smform-checkbox-cont">
109
  <?php foreach ( $choices as $choicekey => $choice ): ?>
110
 
111
  <div class="smform-control smform-controllabelpos-radio checkbox">
112
- <label><input name="smFieldData[<?php echo $cssID ?>][checkbox][]" type="checkbox" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="checkbox" /> <?php echo esc_html( $choice ) ?></label>
113
  </div>
114
 
115
  <?php endforeach; ?>
18
  <?php foreach( $form->getFields() as $key => $field ): extract( $field, EXTR_OVERWRITE ); ?>
19
 
20
 
21
+ <div class="smform-fieldcont smform-fieldcont<?php echo esc_attr( $type ); ?> <?php esc_attr_e( $cssClasses ) ?>" id="smform-fieldcont<?php echo $form->getId() . esc_attr( $key ); ?>"
22
+ data-key="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
23
  data-rule="<?php echo ( $ruleEnabled ) ? 'enabled': 'disabled' ?>"
24
+ data-ruleoperator="<?php echo esc_attr( $rules['operator'] ); ?>"
25
+ data-ruleaction="<?php echo esc_attr( $rules['action'] ); ?>"
26
+ data-rulecmpvalue="<?php echo esc_attr( $rules['cmpValue'] ); ?>"
27
+ data-rulefield="<?php echo esc_attr( $rules['field'] ); ?>" >
28
 
29
  <?php do_action( 'smuzform_showfield_start', $field, $form->getId() ) ?>
30
 
31
  <?php if ( $type == 'singletext' ): ?>
32
 
33
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
34
 
35
+ <input name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
36
  value="<?php esc_attr_e($preValue) ?>"
37
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
38
+ class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
39
  type="text" <?php echo ( $required ) ? 'required ': '' ?> date-type="text" />
40
 
41
  <?php endif; ?>
42
 
43
  <?php if ( $type == 'number' ): ?>
44
 
45
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
46
 
47
+ <input name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
48
  value="<?php esc_attr_e($preValue) ?>"
49
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
50
+ class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
51
  type="text" <?php echo ( $required ) ? 'required ': '' ?>
52
  data-type="number" />
53
 
55
 
56
  <?php if ( $type == 'textarea' ): ?>
57
 
58
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
59
 
60
+ <textarea name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
61
  placeholder="<?php esc_attr_e( $placeholderText ) ?>"
62
+ class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?> smform-control smform-controllabelpostextarea"
63
  <?php echo ( $required ) ? 'required ': '' ?>
64
  data-type="textarea"
65
  ><?php echo esc_html($preValue) ?></textarea>
68
 
69
  <?php if ( $type == 'dropdown' ): ?>
70
 
71
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
72
 
73
+ <select name="smFieldData[<?php echo esc_attr($cssID); ?>]" id="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>"
74
+ class="smform-control smform-controllabelpos <?php echo ( $required ) ? 'required ': '' ?> smform-field-size<?php echo esc_attr( $size ); ?>"
75
  <?php echo ( $required ) ? 'required ': '' ?>
76
  data-type="select" >
77
 
87
 
88
  <?php if ( $type == 'radio' ): ?>
89
 
90
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
91
 
92
  <div class="smform-radio-cont">
93
  <?php foreach ( $choices as $choicekey => $choice ): ?>
94
 
95
  <div class="smform-control smform-controllabelpos-radio radio">
96
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>]" type="radio" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="radio" /> <?php echo esc_html( $choice ) ?></label>
97
  </div>
98
 
99
  <?php endforeach; ?>
103
 
104
  <?php if ( $type == 'checkbox' ): ?>
105
 
106
+ <label for="smform-field<?php echo $form->getId() . esc_attr( $key ); ?>" class="smform-field-label <?php echo ( $required ) ? 'required ': ''; echo ( ! $labelVisible ) ? 'smform-labelhidden': '' ?>"><?php echo esc_html( $label ) ?></label>
107
 
108
  <div class="smform-checkbox-cont">
109
  <?php foreach ( $choices as $choicekey => $choice ): ?>
110
 
111
  <div class="smform-control smform-controllabelpos-radio checkbox">
112
+ <label><input name="smFieldData[<?php echo esc_attr($cssID); ?>][checkbox][]" type="checkbox" <?php echo ($choicekey === $selectedChoice ) ? 'checked': '' ?> value="<?php esc_attr_e( $choice ) ?>" <?php echo ( $required ) ? 'required ': '' ?> data-type="checkbox" /> <?php echo esc_html( $choice ) ?></label>
113
  </div>
114
 
115
  <?php endforeach; ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: umarbajwa
3
  Requires at least: 3.7
4
  Tested up to: 5.8
5
  Tags: contact form, form builder, contact, landing page, form, custom forms
6
- Stable tag: 1.9.8.3
7
  Donate Link: https://web-settler.com/form-builder/
8
  License: GPL V2 or latest
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
3
  Requires at least: 3.7
4
  Tested up to: 5.8
5
  Tags: contact form, form builder, contact, landing page, form, custom forms
6
+ Stable tag: 1.9.8.4
7
  Donate Link: https://web-settler.com/form-builder/
8
  License: GPL V2 or latest
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html