Visual Form Builder - Version 2.7

Version Description

Add sidebar and dashboard widgets. Fix Export bugs.

Download this release

Release Info

Developer mmuro
Plugin Icon 128x128 Visual Form Builder
Version 2.7
Comparing to
See all releases

Code changes from version 2.6.9 to 2.7

css/visual-form-builder-admin.css CHANGED
@@ -157,15 +157,21 @@
157
  margin-left: 150px;
158
  }
159
  .vfb-box {
160
- border: 1px solid #dfdfdf;
 
 
 
161
  border-radius: 3px 3px 3px 3px;
162
- box-shadow: 0 1px 0 #fff inset;
163
- background-color: #f5f5f5;
164
- background-image: -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
165
- position: relative;
166
- padding: 0 10px;
 
 
 
 
167
  line-height: 1.4em;
168
- float: left;
169
  }
170
  .vfb-box .button-primary {
171
  float: right;
@@ -416,14 +422,7 @@ a.form-boxes-title {
416
  }
417
  .ui-state-disabled .menu-item-handle {
418
  cursor: default;
419
- background: #bbb;
420
- background-image: -moz-linear-gradient(top, #fff 0, #bbb 100%);
421
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #bbb));
422
- background-image: -webkit-linear-gradient(top, #fff 0, #bbb 100%);
423
- background-image: -o-linear-gradient(top, #fff 0, #bbb 100%);
424
- background-image: -ms-linear-gradient(top, #fff 0, #bbb 100%);
425
- background-image: linear-gradient(to bottom, #fff 0, #bbb 100%);
426
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff', endColorstr='#bbb', GradientType=0);
427
  }
428
  .item-conditional-icon {
429
  background: url('../images/sprite.png?d=20120921') -10px -1449px no-repeat transparent;
@@ -469,13 +468,6 @@ label.error {
469
  }
470
  .menu-item-handle.fieldset, #form-element-fieldset {
471
  background: #e3e3e3;
472
- background-image: -moz-linear-gradient(top, #e3e3e3 0, #ccc 100%);
473
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e3e3e3), color-stop(100%, #ccc));
474
- background-image: -webkit-linear-gradient(top, #e3e3e3 0, #ccc 100%);
475
- background-image: -o-linear-gradient(top, #e3e3e3 0, #ccc 100%);
476
- background-image: -ms-linear-gradient(top, #e3e3e3 0, #ccc 100%);
477
- background-image: linear-gradient(to bottom, #e3e3e3 0, #ccc 100%);
478
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#cccccc', GradientType=0);
479
  box-shadow: 0 1px 0 #e3e3e3 inset;
480
  }
481
  .menu-item-handle .item-title {
157
  margin-left: 150px;
158
  }
159
  .vfb-box {
160
+ position:relative;
161
+ float:left;
162
+ padding:0 10px;
163
+ border: 1px solid #DFDFDF;
164
  border-radius: 3px 3px 3px 3px;
165
+ background-color: #F5F5F5;
166
+ background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
167
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f5f5f5));
168
+ background: -webkit-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
169
+ background: -o-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
170
+ background: -ms-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
171
+ background: linear-gradient(to bottom, #ffffff 0%,#f5f5f5 100%);
172
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f5f5f5',GradientType=0 );
173
+ box-shadow: 0 1px 0 #FFFFFF inset;
174
  line-height: 1.4em;
 
175
  }
176
  .vfb-box .button-primary {
177
  float: right;
422
  }
423
  .ui-state-disabled .menu-item-handle {
424
  cursor: default;
425
+ background: #dfdfdf;
 
 
 
 
 
 
 
426
  }
427
  .item-conditional-icon {
428
  background: url('../images/sprite.png?d=20120921') -10px -1449px no-repeat transparent;
468
  }
469
  .menu-item-handle.fieldset, #form-element-fieldset {
470
  background: #e3e3e3;
 
 
 
 
 
 
 
471
  box-shadow: 0 1px 0 #e3e3e3 inset;
472
  }
473
  .menu-item-handle .item-title {
css/visual-form-builder.css CHANGED
@@ -105,6 +105,12 @@ label.vfb-desc{
105
  padding-top:2px;
106
  text-align:right;
107
  }
 
 
 
 
 
 
108
 
109
  label.vfb-desc{
110
  font-weight:bold;
@@ -289,7 +295,7 @@ p#form_success{
289
  text-decoration:line-through;
290
  }
291
 
292
- .item-instructions{
293
  background-color:#e3e3e3;
294
  border-radius:3px;
295
  }
105
  padding-top:2px;
106
  text-align:right;
107
  }
108
+
109
+ .visual-form-builder.left-label li div,
110
+ .visual-form-builder.right-label li div {
111
+ float: left;
112
+ width: 65%;
113
+ }
114
 
115
  label.vfb-desc{
116
  font-weight:bold;
295
  text-decoration:line-through;
296
  }
297
 
298
+ .vfb-item-instructions{
299
  background-color:#e3e3e3;
300
  border-radius:3px;
301
  }
includes/admin-new-form.php CHANGED
@@ -30,7 +30,7 @@
30
  <tr valign="top">
31
  <th scope="row"><label for="form-email-from"><?php _e( 'Reply-To E-mail' , 'visual-form-builder'); ?></label></th>
32
  <td>
33
- <input type="text" value="" placeholder="" class="regular-text" id="form-email-from" name="form_email_from" />
34
  <p class="description"><?php _e( 'Required. Replies to your email will go here.' , 'visual-form-builder'); ?></p>
35
  <p class="description"><?php _e( 'Tip: for best results, use an email that exists on this domain.' , 'visual-form-builder'); ?></p>
36
  </td>
30
  <tr valign="top">
31
  <th scope="row"><label for="form-email-from"><?php _e( 'Reply-To E-mail' , 'visual-form-builder'); ?></label></th>
32
  <td>
33
+ <input type="text" value="" placeholder="" class="regular-text required" id="form-email-from" name="form_email_from" />
34
  <p class="description"><?php _e( 'Required. Replies to your email will go here.' , 'visual-form-builder'); ?></p>
35
  <p class="description"><?php _e( 'Tip: for best results, use an email that exists on this domain.' , 'visual-form-builder'); ?></p>
36
  </td>
includes/class-export.php CHANGED
@@ -30,7 +30,7 @@ class VisualFormBuilder_Export {
30
 
31
  // AJAX for loading new entry checkboxes
32
  add_action( 'wp_ajax_visual_form_builder_export_load_options', array( &$this, 'ajax_load_options' ) );
33
-
34
  $this->process_export_action();
35
  }
36
 
@@ -123,7 +123,20 @@ class VisualFormBuilder_Export {
123
 
124
  echo '<div id="vfb-export-entries-fields">';
125
 
126
- $this->build_options( $data );
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
  echo '</div>';
129
 
@@ -335,7 +348,7 @@ class VisualFormBuilder_Export {
335
 
336
  // Return nothing if no entries found
337
  if ( !$entries ) {
338
- echo __( 'No entries to pull field names from.', 'vfb_pro_display_entries' );
339
  wp_die();
340
  }
341
 
@@ -345,28 +358,22 @@ class VisualFormBuilder_Export {
345
  // Get JSON data
346
  $data = json_decode( $columns, true );
347
 
348
- $this->build_options( $data );
349
-
350
- wp_die();
351
- }
352
-
353
- public function build_options( $data ) {
354
-
355
  $array = array();
356
  foreach ( $data as $row ) :
357
  $array = array_merge( $row, $array );
358
  endforeach;
359
 
360
  $array = array_keys( $array );
361
- $array = array_values( array_merge( $this->default_cols, $array ) );
362
  $array = array_map( 'stripslashes', $array );
363
 
364
  foreach ( $array as $k => $v ) :
365
- $selected = ( in_array( $v, $this->default_cols ) ) ? ' checked="checked"' : '';
366
 
367
- echo sprintf( '<label for="vfb-display-entries-val-%1$d"><input name="entries_columns[]" class="vfb-display-entries-vals" id="vfb-display-entries-val-%1$d" type="checkbox" value="%2$s" %3$s> %2$s</label><br>', $k, $v, $selected );
368
  endforeach;
369
 
 
370
  }
371
 
372
  /**
30
 
31
  // AJAX for loading new entry checkboxes
32
  add_action( 'wp_ajax_visual_form_builder_export_load_options', array( &$this, 'ajax_load_options' ) );
33
+
34
  $this->process_export_action();
35
  }
36
 
123
 
124
  echo '<div id="vfb-export-entries-fields">';
125
 
126
+ $array = array();
127
+ foreach ( $data as $row ) :
128
+ $array = array_merge( $row, $array );
129
+ endforeach;
130
+
131
+ $array = array_keys( $array );
132
+ $array = array_values( array_merge( $this->default_cols, $array ) );
133
+ $array = array_map( 'stripslashes', $array );
134
+
135
+ foreach ( $array as $k => $v ) :
136
+ $selected = ( in_array( $v, $this->default_cols ) ) ? ' checked="checked"' : '';
137
+
138
+ echo sprintf( '<label for="vfb-display-entries-val-%1$d"><input name="entries_columns[]" class="vfb-display-entries-vals" id="vfb-display-entries-val-%1$d" type="checkbox" value="%2$s" %3$s> %4$s</label><br>', $k, $v, $selected, $v );
139
+ endforeach;
140
 
141
  echo '</div>';
142
 
348
 
349
  // Return nothing if no entries found
350
  if ( !$entries ) {
351
+ echo __( 'No entries to pull field names from.', 'visual-form-builder' );
352
  wp_die();
353
  }
354
 
358
  // Get JSON data
359
  $data = json_decode( $columns, true );
360
 
 
 
 
 
 
 
 
361
  $array = array();
362
  foreach ( $data as $row ) :
363
  $array = array_merge( $row, $array );
364
  endforeach;
365
 
366
  $array = array_keys( $array );
367
+ $array = array_values( array_merge( $export->default_cols, $array ) );
368
  $array = array_map( 'stripslashes', $array );
369
 
370
  foreach ( $array as $k => $v ) :
371
+ $selected = ( in_array( $v, $export->default_cols ) ) ? ' checked="checked"' : '';
372
 
373
+ echo sprintf( '<label for="vfb-display-entries-val-%1$d"><input name="entries_columns[]" class="vfb-display-entries-vals" id="vfb-display-entries-val-%1$d" type="checkbox" value="%2$s" %3$s> %4$s</label><br>', $k, $v, $selected, $v );
374
  endforeach;
375
 
376
+ wp_die();
377
  }
378
 
379
  /**
includes/class-widget.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_action( 'widgets_init', 'vfb_register_widgets' );
4
+
5
+ function vfb_register_widgets() {
6
+ register_widget( 'VisualFormBuilder_Widget' );
7
+ }
8
+
9
+ /**
10
+ * Class that builds our Import page
11
+ *
12
+ * @since 2.7
13
+ */
14
+ class VisualFormBuilder_Widget extends WP_Widget {
15
+ public function __construct(){
16
+ global $wpdb;
17
+
18
+ /* Setup global database table names */
19
+ $this->field_table_name = $wpdb->prefix . 'visual_form_builder_fields';
20
+ $this->form_table_name = $wpdb->prefix . 'visual_form_builder_forms';
21
+ $this->entries_table_name = $wpdb->prefix . 'visual_form_builder_entries';
22
+
23
+ $args = array(
24
+ 'classname' => 'vfb_widget_class',
25
+ 'description' => 'Visual Form Builder widget'
26
+ );
27
+
28
+ $this->WP_Widget( 'vfb_widget', 'Visual Form Builder', $args );
29
+ }
30
+
31
+ public function form( $instance ) {
32
+ global $wpdb;
33
+
34
+ // Query to get all forms
35
+ $order = sanitize_sql_orderby( 'form_id ASC' );
36
+ $where = apply_filters( 'vfb_pre_get_forms_widget', '' );
37
+ $forms = $wpdb->get_results( "SELECT * FROM $this->form_table_name WHERE 1=1 $where ORDER BY $order" );
38
+
39
+ $instance = wp_parse_args( (array) $instance );
40
+ ?>
41
+ <select name="<?php echo $this->get_field_name( 'id' ); ?>">
42
+ <?php
43
+ foreach ( $forms as $form ) {
44
+ echo sprintf(
45
+ '<option value="%1$d" id="%2$s"%3$s>%4$s</option>',
46
+ absint( $form->form_id ),
47
+ esc_html( $form->form_key ),
48
+ selected( $form->form_id, $instance['id'], 1 ),
49
+ wp_specialchars_decode( esc_html( stripslashes( $form->form_title ) ), ENT_QUOTES )
50
+ );
51
+ }
52
+ ?>
53
+ </select>
54
+ <?php
55
+ }
56
+
57
+ public function widget( $args, $instance ) {
58
+ extract( $args );
59
+
60
+ echo $before_widget;
61
+
62
+ // Parse the arguments into an array
63
+ $atts = wp_parse_args( $instance );
64
+
65
+ // Sanitize and save form id
66
+ $form_id = absint( $atts['id'] );
67
+
68
+ // Print the output
69
+ echo do_shortcode( "[vfb id=$form_id]" );
70
+
71
+ echo $after_widget;
72
+ }
73
+
74
+ public function update( $new_instance, $old_instance ) {
75
+ $instance = $old_instance;
76
+
77
+ $instance['id'] = $new_instance['id'];
78
+
79
+ return $instance;
80
+ }
81
+ }
82
+ ?>
includes/email.php CHANGED
@@ -15,11 +15,6 @@ if ( true == $required && !empty( $secret_field ) ) {
15
 
16
  // Basic security check before moving any further
17
  if ( isset( $_REQUEST['visual-form-builder-submit'] ) ) :
18
- $nonce = $_REQUEST['_wpnonce'];
19
-
20
- // Security check to verify the nonce
21
- if ( ! wp_verify_nonce( $nonce, 'visual-form-builder-nonce' ) )
22
- wp_die( __( 'Security check: unable to verify nonce value.' , 'visual-form-builder' ), '', array( 'back_link' => true ) );
23
 
24
  // Test if it's a known SPAM bot
25
  if ( $this->isBot() )
@@ -281,7 +276,7 @@ if ( isset( $_REQUEST['visual-form-builder-submit'] ) ) :
281
  'sender_email' => $form_settings->form_from,
282
  'emails_to' => serialize( $form_settings->form_to ),
283
  'date_submitted' => date_i18n( 'Y-m-d G:i:s' ),
284
- 'ip_address' => $_SERVER['REMOTE_ADDR']
285
  );
286
 
287
  // Insert this data into the entries table
@@ -353,4 +348,4 @@ if ( isset( $_REQUEST['visual-form-builder-submit'] ) ) :
353
  endif;
354
 
355
  endif;
356
- ?>
15
 
16
  // Basic security check before moving any further
17
  if ( isset( $_REQUEST['visual-form-builder-submit'] ) ) :
 
 
 
 
 
18
 
19
  // Test if it's a known SPAM bot
20
  if ( $this->isBot() )
276
  'sender_email' => $form_settings->form_from,
277
  'emails_to' => serialize( $form_settings->form_to ),
278
  'date_submitted' => date_i18n( 'Y-m-d G:i:s' ),
279
+ 'ip_address' => esc_html( $_SERVER['REMOTE_ADDR'] )
280
  );
281
 
282
  // Insert this data into the entries table
348
  endif;
349
 
350
  endif;
351
+ ?>
includes/form-output.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  global $wpdb;
3
 
4
  // Extract shortcode attributes, set defaults
@@ -12,507 +16,559 @@ if ( !$this->add_scripts )
12
  $this->scripts();
13
 
14
  // Get form id. Allows use of [vfb id=1] or [vfb 1]
15
- $form_id = ( isset( $id ) && !empty( $id ) ) ? $id : key( $atts );
16
-
17
- $open_fieldset = $open_section = false;
18
 
19
- // Default the submit value
20
- $submit = 'Submit';
21
 
22
  // If form is submitted, show success message, otherwise the form
23
- if ( isset( $_REQUEST['visual-form-builder-submit'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'visual-form-builder-nonce' ) && isset( $_REQUEST['form_id'] ) && $_REQUEST['form_id'] == $form_id ) {
24
  $output = $this->confirmation();
25
  return;
26
  }
27
 
28
- // Get forms
29
  $order = sanitize_sql_orderby( 'form_id DESC' );
30
- $forms = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order", $form_id ) );
 
 
 
 
31
 
32
  // Get fields
33
  $order_fields = sanitize_sql_orderby( 'field_sequence ASC' );
34
  $fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY $order_fields", $form_id ) );
35
 
36
- // Setup count for fieldset and ul/section class names
37
  $count = 1;
38
-
 
39
  $verification = '';
40
 
41
- foreach ( $forms as $form ) :
42
- $label_alignment = ( $form->form_label_alignment !== '' ) ? " $form->form_label_alignment" : '';
43
- $output = '<div class="visual-form-builder-container"><form id="' . $form->form_key . '" class="visual-form-builder' . $label_alignment . '" method="post" enctype="multipart/form-data">
44
- <input type="hidden" name="form_id" value="' . $form->form_id . '" />';
45
- $output .= wp_nonce_field( 'visual-form-builder-nonce', '_wpnonce', false, false );
46
 
47
- foreach ( $fields as $field ) {
48
- // If field is required, build the span and add setup the 'required' class
49
- $required_span = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? ' <span>*</span>' : '';
50
- $required = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? ' required' : '';
51
- $validation = ( !empty( $field->field_validation ) ) ? " $field->field_validation" : '';
52
- $css = ( !empty( $field->field_css ) ) ? " $field->field_css" : '';
53
- $id_attr = 'vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id;
54
- $size = ( !empty( $field->field_size ) ) ? " vfb-$field->field_size" : '';
55
- $layout = ( !empty( $field->field_layout ) ) ? " vfb-$field->field_layout" : '';
56
- $default = ( !empty( $field->field_default ) ) ? html_entity_decode( stripslashes( $field->field_default ) ) : '';
57
- $description = ( !empty( $field->field_description ) ) ? wp_specialchars_decode( esc_html( stripslashes( $field->field_description ) ) ) : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- // Close each section
60
- if ( $open_section == true ) {
61
- // If this field's parent does NOT equal our section ID
62
- if ( $sec_id && $sec_id !== $field->field_parent ) {
63
- $output .= '</div><div class="vfb-clear"></div>';
64
- $open_section = false;
65
- }
66
- }
67
 
68
- // Force an initial fieldset and display an error message to strongly encourage user to add one
69
- if ( $count === 1 && $field->field_type !== 'fieldset' ) {
70
- $output .= '<fieldset class="fieldset"><div class="legend" style="background-color:#FFEBE8;border:1px solid #CC0000;"><h3>Oops! Missing Fieldset</h3><p style="color:black;">If you are seeing this message, it means you need to <strong>add a Fieldset to the beginning of your form</strong>. Your form may not function or display properly without one.</p></div><ul class="section section-' . $count . '">';
 
 
 
 
 
71
 
72
- $count++;
73
- }
 
 
74
 
75
- if ( $field->field_type == 'fieldset' ) {
76
- // Close each fieldset
77
- if ( $open_fieldset == true )
78
- $output .= '</ul><br /></fieldset>';
79
-
80
- $output .= '<fieldset class="vfb-fieldset vfb-fieldset-' . $count . ' ' . $field->field_key . $css . '" id="' . $id_attr . '"><div class="vfb-legend"><h3>' . stripslashes( $field->field_name ) . '</h3></div><ul class="vfb-section vfb-section-' . $count . '">';
81
- $open_fieldset = true;
82
- $count++;
83
- }
84
- elseif ( $field->field_type == 'section' ) {
85
- $output .= '<div class="vfb-section-div vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . ' ' . $css . '"><h4>' . stripslashes( $field->field_name ) . '</h4>';
86
-
87
- // Save section ID for future comparison
88
- $sec_id = $field->field_id;
89
- $open_section = true;
90
- }
91
- elseif ( !in_array( $field->field_type, array( 'verification', 'secret', 'submit' ) ) ) {
92
-
93
- $columns_choice = ( !empty( $field->field_size ) && in_array( $field->field_type, array( 'radio', 'checkbox' ) ) ) ? " vfb-$field->field_size" : '';
94
-
95
- if ( $field->field_type !== 'hidden' ) {
96
- $id_attr = 'vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id;
97
- $output .= '<li class="vfb-item vfb-item-' . $field->field_type . $columns_choice . $layout . '" id="item-' . $id_attr . '"><label for="' . $id_attr . '" class="vfb-desc">'. stripslashes( $field->field_name ) . $required_span . '</label>';
98
- }
99
- }
100
- elseif ( in_array( $field->field_type, array( 'verification', 'secret' ) ) ) {
101
 
102
- if ( $field->field_type == 'verification' )
103
- $verification .= '<fieldset class="vfb-fieldset vfb-fieldset-' . $count . ' ' . $field->field_key . $css . '" id="' . $id_attr . '"><div class="vfb-legend"><h3>' . stripslashes( $field->field_name ) . '</h3></div><ul class="vfb-section vfb-section-' . $count . '">';
 
 
 
 
 
 
 
 
104
 
105
- if ( $field->field_type == 'secret' ) {
106
- // Default logged in values
107
- $logged_in_display = $logged_in_value = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
 
109
- // If the user is logged in, fill the field in for them
110
- if ( is_user_logged_in() ) {
111
- // Hide the secret field if logged in
112
- $logged_in_display = ' style="display:none;"';
113
- $logged_in_value = 14;
114
-
115
- // Get logged in user details
116
- $user = wp_get_current_user();
117
- $user_identity = ! empty( $user->ID ) ? $user->display_name : '';
118
-
119
- // Display a message for logged in users
120
- $verification .= '<li class="vfb-item" id="' . $id_attr . '">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. Verification not required.', 'visual-form-builder' ), admin_url( 'profile.php' ), $user_identity ) . '</li>';
121
- }
122
-
123
- $validation = ' {digits:true,maxlength:2,minlength:2}';
124
- $verification .= '<li class="vfb-item vfb-item-' . $field->field_type . '"' . $logged_in_display . '><label for="' . $id_attr . '" class="vfb-desc">'. stripslashes( $field->field_name ) . $required_span . '</label>';
125
-
126
- // Set variable for testing if required is Yes/No
127
- if ( $required == '' )
128
- $verification .= '<input type="hidden" name="_vfb-required-secret" value="0" />';
129
-
130
- $verification .= '<input type="hidden" name="_vfb-secret" value="vfb-' . $field->field_id . '" />';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
- if ( !empty( $field->field_description ) )
133
- $verification .= '<span><input type="text" name="vfb-' . $field->field_id . '" id="' . $id_attr . '" value="' . $logged_in_value . '" class="vfb-text ' . $size . $required . $validation . $css . '" /><label>' . html_entity_decode( stripslashes( $field->field_description ) ) . '</label></span>';
134
- else
135
- $verification .= '<input type="text" name="vfb-' . $field->field_id . '" id="' . $id_attr . '" value="' . $logged_in_value . '" class="vfb-text ' . $size . $required . $validation . $css . '" />';
 
 
 
 
 
 
 
136
  }
137
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
- switch ( $field->field_type ) {
140
- case 'text' :
141
- case 'email' :
142
- case 'url' :
143
- case 'currency' :
144
- case 'number' :
145
- case 'phone' :
146
-
147
- // HTML5 types
148
- if ( in_array( $field->field_type, array( 'email', 'url' ) ) )
149
- $type = esc_attr( $field->field_type );
150
- elseif ( 'phone' == $field->field_type )
151
- $type = 'tel';
152
- else
153
- $type = 'text';
154
-
155
- $form_item = sprintf(
156
- '<input type="%8$s" name="vfb-%1$d" id="%2$s" value="%3$s" class="vfb-text %4$s %5$s %6$s %7$s" />',
157
  absint( $field->field_id ),
158
  $id_attr,
159
- $default,
160
- $size,
161
  $required,
162
- $validation,
163
  $css,
164
- $type
 
165
  );
166
-
167
- $output .= ( !empty( $description ) ) ? sprintf( '<span>%1$s<label>%2$s</label></span>', $form_item, $description ) : $form_item;
168
-
169
- break;
170
 
171
- case 'textarea' :
172
-
173
- $form_item = sprintf(
174
- '<textarea name="vfb-%1$d" id="%2$s" class="vfb-textarea %4$s %5$s %6$s">%3$s</textarea>',
175
- absint( $field->field_id ),
176
- $id_attr,
177
- $default,
178
- $size,
179
- $required,
180
- $css
181
- );
182
-
183
- $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
184
-
185
- break;
186
 
187
- case 'select' :
188
-
189
- $field_options = maybe_unserialize( $field->field_options );
190
-
191
- $options = '';
192
-
193
- // Loop through each option and output
194
- foreach ( $field_options as $option => $value ) {
195
- $options .= sprintf( '<option value="%1$s"%2$s>%1$s</option>', trim( stripslashes( $value ) ), selected( $default, ++$option, 0 ) );
196
- }
197
-
198
- $form_item = sprintf(
199
- '<select name="vfb-%1$d" id="%2$s" class="vfb-select %3$s %4$s %5$s">%6$s</select>',
 
 
 
 
 
200
  absint( $field->field_id ),
201
  $id_attr,
202
- $size,
203
  $required,
204
  $css,
205
- $options
 
206
  );
207
-
208
- $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
209
-
210
- break;
211
 
212
- case 'radio' :
213
-
214
- $field_options = maybe_unserialize( $field->field_options );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
- $options = '';
 
217
 
218
- // Loop through each option and output
219
- foreach ( $field_options as $option => $value ) {
220
- $options .= sprintf(
221
- '<span><input type="radio" name="vfb-%1$d" id="%2$s-%3$d" value="%6$s" class="vfb-radio %4$s %5$s"%7$s /><label for="%2$s-%3$d" class="vfb-choice">%6$s</label></span>',
 
 
 
 
 
 
222
  absint( $field->field_id ),
223
  $id_attr,
224
- $option,
225
- $required,
226
- $css,
227
- trim( stripslashes( $value ) ),
228
- checked( $default, ++$option, 0 )
 
229
  );
230
- }
231
-
232
- $form_item = $options;
233
-
234
- $output .= '<div>';
235
-
236
- $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
237
-
238
- $output .= '<div style="clear:both"></div></div>';
239
-
240
- break;
241
-
242
- case 'checkbox' :
243
-
244
- $field_options = maybe_unserialize( $field->field_options );
245
-
246
- $options = '';
247
-
248
- // Loop through each option and output
249
- foreach ( $field_options as $option => $value ) {
250
- $options .= sprintf(
251
- '<span><input type="checkbox" name="vfb-%1$d[]" id="%2$s-%3$d" value="%6$s" class="vfb-checkbox %4$s %5$s"%7$s /><label for="%2$s-%3$d" class="vfb-choice">%6$s</label></span>',
252
  absint( $field->field_id ),
253
  $id_attr,
254
- $option,
255
- $required,
256
- $css,
257
- trim( stripslashes( $value ) ),
258
- checked( $default, ++$option, 0 )
 
259
  );
260
- }
261
 
262
- $form_item = $options;
263
 
264
- $output .= '<div>';
265
-
266
- $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
267
-
268
- $output .= '<div style="clear:both"></div></div>';
269
 
270
- break;
271
 
272
- case 'address' :
273
-
274
- $address = '';
275
-
276
- $address_parts = array(
277
- 'address' => array(
278
- 'label' => __( 'Address', 'visual-form-builder-pro' ),
279
- 'layout' => 'full'
280
- ),
281
- 'address-2' => array(
282
- 'label' => __( 'Address Line 2', 'visual-form-builder-pro' ),
283
- 'layout' => 'full'
284
- ),
285
- 'city' => array(
286
- 'label' => __( 'City', 'visual-form-builder-pro' ),
287
- 'layout' => 'left'
288
- ),
289
- 'state' => array(
290
- 'label' => __( 'State / Province / Region', 'visual-form-builder-pro' ),
291
- 'layout' => 'right'
292
- ),
293
- 'zip' => array(
294
- 'label' => __( 'Postal / Zip Code', 'visual-form-builder-pro' ),
295
- 'layout' => 'left'
296
- ),
297
- 'country' => array(
298
- 'label' => __( 'Country', 'visual-form-builder-pro' ),
299
- 'layout' => 'right'
300
- )
301
- );
302
-
303
- $address_parts = apply_filters( 'vfb_address_labels', $address_parts, $form_id );
304
-
305
- foreach ( $address_parts as $parts => $part ) :
306
-
307
- if ( 'country' == $parts ) :
308
-
309
- $options = '';
310
-
311
- foreach ( $this->countries as $country ) {
312
- $options .= sprintf( '<option value="%1$s"%2$s>%1$s</option>', $country, selected( $default, $country, 0 ) );
313
- }
314
-
315
- $address .= sprintf(
316
- '<span class="vfb-%3$s"><select name="vfb-%1$d[%4$s]" class="vfb-select %7$s %8$s" id="%2$s-%4$s">%6$s</select><label for="%2$s-%4$s">%5$s</label></span>',
317
- absint( $field->field_id ),
318
- $id_attr,
319
- $part['layout'],
320
- $parts,
321
- $part['label'],
322
- $options,
323
- $required,
324
- $css
325
- );
326
-
327
- else :
328
-
329
- $address .= sprintf(
330
- '<span class="vfb-%3$s"><input type="text" name="vfb-%1$d[%4$s]" id="%2$s-%4$s" maxlength="150" class="vfb-text vfb-medium %7$s %8$s" /><label for="%2$s-%4$s">%5$s</label></span>',
331
- absint( $field->field_id ),
332
- $id_attr,
333
- $part['layout'],
334
- $parts,
335
- $part['label'],
336
- $size,
337
- $required,
338
- $css
339
- );
340
-
341
- endif;
342
-
343
- endforeach;
344
-
345
- $output .= "<div>$address</div>";
346
-
347
- break;
348
 
349
- case 'date' :
350
-
351
- $form_item = sprintf(
352
- '<input type="date" name="vfb-%1$d" id="%2$s" value="%3$s" class="vfb-text vfb-date-picker %4$s %5$s %6$s" />',
353
- absint( $field->field_id ),
354
- $id_attr,
355
- $default,
356
- $size,
357
- $required,
358
- $css
359
- );
360
-
361
- $output .= ( !empty( $description ) ) ? sprintf( '<span>%1$s<label>%2$s</label></span>', $form_item, $description ) : $form_item;
362
-
363
- break;
364
 
365
- case 'time' :
366
-
367
- $hour = $minute = $ampm = '';
368
-
369
- // Get the time format (12 or 24)
370
- $time_format = str_replace( 'time-', '', $validation );
371
-
372
- $time_format = apply_filters( 'vfb_time_format', $time_format, $form_id );
373
- $total_mins = apply_filters( 'vfb_time_min_total', 55, $form_id );
374
- $min_interval = apply_filters( 'vfb_time_min_interval', 5, $form_id );
375
-
376
- // Set whether we start with 0 or 1 and how many total hours
377
- $hour_start = ( $time_format == '12' ) ? 1 : 0;
378
- $hour_total = ( $time_format == '12' ) ? 12 : 23;
379
-
380
- // Hour
381
- for ( $i = $hour_start; $i <= $hour_total; $i++ ) {
382
- $hour .= sprintf( '<option value="%1$02d">%1$02d</option>', $i );
383
- }
384
-
385
- // Minute
386
- for ( $i = 0; $i <= $total_mins; $i += $min_interval ) {
387
- $minute .= sprintf( '<option value="%1$02d">%1$02d</option>', $i );
388
- }
389
-
390
- // AM/PM
391
- if ( $time_format == '12' ) {
392
- $ampm = sprintf(
393
- '<span class="vfb-time"><select name="vfb-%1$d[ampm]" id="%2$s-ampm" class="vfb-select %5$s %6$s"><option value="AM">AM</option><option value="PM">PM</option></select><label for="%2$s-ampm">AM/PM</label></span>',
394
- absint( $field->field_id ),
395
- $id_attr,
396
- $hour,
397
- $minute,
398
- $required,
399
- $css
400
- );
401
- }
402
-
403
- $form_item = sprintf(
404
- '<span class="vfb-time"><select name="vfb-%1$d[hour]" id="%2$s-hour" class="vfb-select %5$s %6$s">%3$s</select><label for="%2$s-hour">HH</label></span>' .
405
- '<span class="vfb-time"><select name="vfb-%1$d[min]" id="%2$s-min" class="vfb-select %5$s %6$s">%4$s</select><label for="%2$s-min">MM</label></span>' .
406
- '%7$s',
407
  absint( $field->field_id ),
408
  $id_attr,
409
  $hour,
410
  $minute,
411
  $required,
412
- $css,
413
- $ampm
414
- );
415
-
416
- $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
417
-
418
- $output .= '<div class="clear"></div>';
419
-
420
- break;
421
-
422
- case 'html' :
423
-
424
- $form_item = sprintf(
425
- '<script type="text/javascript">edToolbar("%2$s");</script>' .
426
- '<textarea name="vfb-%1$d" id="%2$s" class="vfb-textarea vfbEditor %4$s %5$s %6$s">%3$s</textarea>',
427
- absint( $field->field_id ),
428
- $id_attr,
429
- $default,
430
- $size,
431
- $required,
432
  $css
433
- );
434
-
435
- $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
436
-
437
- break;
438
 
439
- case 'file-upload' :
440
-
441
- $options = maybe_unserialize( $field->field_options );
442
- $accept = ( !empty( $options[0] ) ) ? " {accept:'$options[0]'}" : '';
443
-
444
-
445
- $form_item = sprintf(
446
- '<input type="file" name="vfb-%1$d" id="%2$s" value="%3$s" class="vfb-text %4$s %5$s %6$s %7$s %8$s" />',
447
- absint( $field->field_id ),
448
- $id_attr,
449
- $default,
450
- $size,
451
- $required,
452
- $validation,
453
- $css,
454
- $accept
455
- );
456
-
457
- $output .= ( !empty( $description ) ) ? sprintf( '<span>%1$s<label>%2$s</label></span>', $form_item, $description ) : $form_item;
458
-
459
- break;
460
 
461
- case 'instructions' :
462
-
463
- $output .= wp_specialchars_decode( esc_html( stripslashes( $field->field_description ) ) );
464
 
465
- break;
466
 
467
- case 'submit' :
468
-
469
- $submit = sprintf(
470
- '<li class="vfb-item vfb-item-submit" id="%2$s"><input type="submit" name="visual-form-builder-submit" value="%1$s" class="vfb-submit %3$s" id="sendmail" /></li>',
471
- esc_attr( stripslashes( $field->field_name ) ),
472
- $id_attr,
473
- $css
474
- );
 
 
 
 
 
 
 
 
 
 
 
 
475
 
476
- break;
 
 
477
 
478
- default:
479
- echo '';
480
- }
481
-
482
- // Closing </li>
483
- $output .= ( !in_array( $field->field_type , array( 'verification', 'secret', 'submit', 'fieldset', 'section' ) ) ) ? '</li>' : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
484
  }
 
 
 
 
 
 
 
 
 
 
 
485
 
 
 
 
 
 
 
 
 
 
 
 
 
486
 
487
- // Close user-added fields
488
- $output .= '</ul><br /></fieldset>';
489
-
490
- // Make sure the verification displays even if they have not updated their form
491
- if ( $verification == '' ) {
492
- $verification = '<fieldset class="vfb-fieldset vfb-verification">
493
- <div class="vfb-legend">
494
- <h3>' . __( 'Verification' , 'visual-form-builder') . '</h3>
495
- </div>
496
- <ul class="vfb-section vfb-section-' . $count . '">
497
- <li class="vfb-item vfb-item-text">
498
- <label for="vfb-secret" class="vfb-desc">' . __( 'Please enter any two digits with <strong>no</strong> spaces (Example: 12)' , 'visual-form-builder') . '<span>*</span></label>
499
- <div>
500
- <input type="text" name="vfb-secret" id="vfb-secret" class="vfb-text vfb-medium" />
501
- </div>
502
- </li>';
503
- }
504
-
505
- // Output our security test
506
- $output .= $verification . '<li style="display:none;">
507
- <label for="vfb-spam">' . __( 'This box is for spam protection - <strong>please leave it blank</strong>' , 'visual-form-builder') . ':</label>
508
- <div>
509
- <input name="vfb-spam" id="vfb-spam" />
510
- </div>
511
- </li>
512
 
513
- ' . $submit . '
514
- </ul>
515
- </fieldset></form></div>';
516
-
517
- endforeach;
 
 
 
 
 
 
518
  ?>
1
  <?php
2
+ // Turn off caching plugin for this page to fix occasional nonce error
3
+ if ( !defined( 'DONOTCACHEPAGE' ) )
4
+ define( 'DONOTCACHEPAGE', true );
5
+
6
  global $wpdb;
7
 
8
  // Extract shortcode attributes, set defaults
16
  $this->scripts();
17
 
18
  // Get form id. Allows use of [vfb id=1] or [vfb 1]
19
+ $form_id = ( isset( $id ) && !empty( $id ) ) ? (int) $id : key( $atts );
 
 
20
 
 
 
21
 
22
  // If form is submitted, show success message, otherwise the form
23
+ if ( isset( $_REQUEST['visual-form-builder-submit'] ) && isset( $_REQUEST['form_id'] ) && $_REQUEST['form_id'] == $form_id ) {
24
  $output = $this->confirmation();
25
  return;
26
  }
27
 
 
28
  $order = sanitize_sql_orderby( 'form_id DESC' );
29
+ $form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order", $form_id ) );
30
+
31
+ // Return if no form found
32
+ if ( !$form )
33
+ return;
34
 
35
  // Get fields
36
  $order_fields = sanitize_sql_orderby( 'field_sequence ASC' );
37
  $fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY $order_fields", $form_id ) );
38
 
39
+ // Setup default variables
40
  $count = 1;
41
+ $open_fieldset = $open_section = false;
42
+ $submit = 'Submit';
43
  $verification = '';
44
 
45
+ $label_alignment = ( $form->form_label_alignment !== '' ) ? " $form->form_label_alignment" : '';
46
+ $output = '<div class="visual-form-builder-container"><form id="' . $form->form_key . '" class="visual-form-builder' . $label_alignment . '" method="post" enctype="multipart/form-data">
47
+ <input type="hidden" name="form_id" value="' . $form->form_id . '" />';
 
 
48
 
49
+ foreach ( $fields as $field ) :
50
+ $field_id = absint( $field->field_id );
51
+ $field_type = esc_html( $field->field_type );
52
+ // If field is required, build the span and add setup the 'required' class
53
+ $required_span = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? ' <span>*</span>' : '';
54
+ $required = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? ' required' : '';
55
+ $validation = ( !empty( $field->field_validation ) ) ? " $field->field_validation" : '';
56
+ $css = ( !empty( $field->field_css ) ) ? " $field->field_css" : '';
57
+ $id_attr = 'vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id;
58
+ $size = ( !empty( $field->field_size ) ) ? " vfb-$field->field_size" : '';
59
+ $layout = ( !empty( $field->field_layout ) ) ? " vfb-$field->field_layout" : '';
60
+ $default = ( !empty( $field->field_default ) ) ? wp_specialchars_decode( esc_html( stripslashes( $field->field_default ) ), ENT_QUOTES ) : '';
61
+ $description = ( !empty( $field->field_description ) ) ? wp_specialchars_decode( esc_html( stripslashes( $field->field_description ) ), ENT_QUOTES ) : '';
62
+
63
+ // Close each section
64
+ if ( $open_section == true ) :
65
+ // If this field's parent does NOT equal our section ID
66
+ if ( $sec_id && $sec_id !== absint( $field->field_parent ) ) :
67
+ $output .= '</div><div class="vfb-clear"></div>';
68
+ $open_section = false;
69
+ endif;
70
+ endif;
71
+
72
+ // Force an initial fieldset and display an error message to strongly encourage user to add one
73
+ if ( $count === 1 && $field_type !== 'fieldset' ) :
74
+ $output .= '<fieldset class="fieldset"><div class="legend" style="background-color:#FFEBE8;border:1px solid #CC0000;"><h3>Oops! Missing Fieldset</h3><p style="color:black;">If you are seeing this message, it means you need to <strong>add a Fieldset to the beginning of your form</strong>. Your form may not function or display properly without one.</p></div><ul class="section section-' . $count . '">';
75
 
76
+ $count++;
77
+ endif;
78
+
79
+ if ( $field_type == 'fieldset' ) :
80
+ // Close each fieldset
81
+ if ( $open_fieldset == true )
82
+ $output .= '</ul><br /></fieldset>';
 
83
 
84
+ $output .= sprintf(
85
+ '<fieldset class="vfb-fieldset vfb-fieldset-%1$d %2$s %3$s" id="%4$s"><div class="vfb-legend"><h3>%5$s</h3></div><ul class="vfb-section vfb-section-%1$d">',
86
+ $count,
87
+ $field->field_key,
88
+ $css,
89
+ $id_attr,
90
+ stripslashes( $field->field_name )
91
+ );
92
 
93
+ $open_fieldset = true;
94
+ $count++;
95
+
96
+ elseif ( $field_type == 'section' ) :
97
 
98
+ $output .= sprintf(
99
+ '<div class="vfb-section-div %1$s %2$s"><h4>%3$s</h4>',
100
+ $id_attr,
101
+ $css,
102
+ stripslashes( $field->field_name )
103
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
+ // Save section ID for future comparison
106
+ $sec_id = $field_id;
107
+ $open_section = true;
108
+
109
+ elseif ( !in_array( $field_type, array( 'verification', 'secret', 'submit' ) ) ) :
110
+
111
+ $columns_choice = ( !empty( $field->field_size ) && in_array( $field_type, array( 'radio', 'checkbox' ) ) ) ? " vfb-$field->field_size" : '';
112
+
113
+ if ( $field_type !== 'hidden' ) :
114
+ $id_attr = 'vfb-' . esc_html( $field->field_key ) . '-' . $field_id;
115
 
116
+ $output .= sprintf(
117
+ '<li class="vfb-item vfb-item-%1$s %2$s %3$s" id="item-%4$s"><label for="%4$s" class="vfb-desc">%5$s %6$s</label>',
118
+ $field_type,
119
+ $columns_choice,
120
+ $layout,
121
+ $id_attr,
122
+ stripslashes( $field->field_name ),
123
+ $required_span
124
+ );
125
+ endif;
126
+
127
+ elseif ( in_array( $field_type, array( 'verification', 'secret' ) ) ) :
128
+
129
+ if ( $field_type == 'verification' ) :
130
+ $verification .= sprintf(
131
+ '<fieldset class="vfb-fieldset vfb-fieldset-%1$d %2$s %3$s" id="%4$s"><div class="vfb-legend"><h3>%5$s</h3></div><ul class="vfb-section vfb-section-%1$d">',
132
+ $count,
133
+ $field->field_key,
134
+ $css,
135
+ $id_attr,
136
+ stripslashes( $field->field_name )
137
+ );
138
+ endif;
139
+
140
+ if ( $field_type == 'secret' ) :
141
+ // Default logged in values
142
+ $logged_in_display = $logged_in_value = '';
143
 
144
+ // If the user is logged in, fill the field in for them
145
+ if ( is_user_logged_in() ) :
146
+ // Hide the secret field if logged in
147
+ $logged_in_display = ' style="display:none;"';
148
+ $logged_in_value = 14;
149
+
150
+ // Get logged in user details
151
+ $user = wp_get_current_user();
152
+ $user_identity = ! empty( $user->ID ) ? $user->display_name : '';
153
+
154
+ // Display a message for logged in users
155
+ $verification .= '<li class="vfb-item" id="' . $id_attr . '">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. Verification not required.', 'visual-form-builder' ), admin_url( 'profile.php' ), $user_identity ) . '</li>';
156
+ endif;
157
+
158
+ $validation = ' {digits:true,maxlength:2,minlength:2}';
159
+ $verification .= '<li class="vfb-item vfb-item-' . $field_type . '"' . $logged_in_display . '><label for="' . $id_attr . '" class="vfb-desc">'. stripslashes( $field->field_name ) . $required_span . '</label>';
160
+
161
+ // Set variable for testing if required is Yes/No
162
+ if ( $required == '' )
163
+ $verification .= '<input type="hidden" name="_vfb-required-secret" value="0" />';
164
+
165
+ $verification .= '<input type="hidden" name="_vfb-secret" value="vfb-' . $field_id . '" />';
166
+
167
+ $verification_item = sprintf(
168
+ '<input type="text" name="vfb-%1$d" id="%2$s" value="%3$s" class="vfb-text %4$s %5$s %6$s %7$s" />',
169
+ $field_id,
170
+ $id_attr,
171
+ $logged_in_value,
172
+ $size,
173
+ $required,
174
+ $validation,
175
+ $css
176
+ );
177
+
178
+ $verification .= ( !empty( $field->field_description ) ) ? sprintf( '<span>%1$s<label>%2$s</label></span>', $verification_item, $description ) : $verification_item;
179
+
180
+ endif;
181
+ endif;
182
+
183
+ switch ( $field_type ) {
184
+ case 'text' :
185
+ case 'email' :
186
+ case 'url' :
187
+ case 'currency' :
188
+ case 'number' :
189
+ case 'phone' :
190
+
191
+ // HTML5 types
192
+ if ( in_array( $field_type, array( 'email', 'url' ) ) )
193
+ $type = esc_attr( $field_type );
194
+ elseif ( 'phone' == $field_type )
195
+ $type = 'tel';
196
+ else
197
+ $type = 'text';
198
+
199
+ $form_item = sprintf(
200
+ '<input type="%8$s" name="vfb-%1$d" id="%2$s" value="%3$s" class="vfb-text %4$s %5$s %6$s %7$s" />',
201
+ absint( $field->field_id ),
202
+ $id_attr,
203
+ $default,
204
+ $size,
205
+ $required,
206
+ $validation,
207
+ $css,
208
+ $type
209
+ );
210
+
211
+ $output .= ( !empty( $description ) ) ? sprintf( '<span>%1$s<label>%2$s</label></span>', $form_item, $description ) : $form_item;
212
+
213
+ break;
214
+
215
+ case 'textarea' :
216
+
217
+ $form_item = sprintf(
218
+ '<textarea name="vfb-%1$d" id="%2$s" class="vfb-textarea %4$s %5$s %6$s">%3$s</textarea>',
219
+ absint( $field->field_id ),
220
+ $id_attr,
221
+ $default,
222
+ $size,
223
+ $required,
224
+ $css
225
+ );
226
+
227
+ $output .= '<div>';
228
+
229
+ $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
230
+
231
+ $output .= '</div>';
232
 
233
+ break;
234
+
235
+ case 'select' :
236
+
237
+ $field_options = maybe_unserialize( $field->field_options );
238
+
239
+ $options = '';
240
+
241
+ // Loop through each option and output
242
+ foreach ( $field_options as $option => $value ) {
243
+ $options .= sprintf( '<option value="%1$s"%2$s>%1$s</option>', trim( stripslashes( $value ) ), selected( $default, ++$option, 0 ) );
244
  }
245
+
246
+ $form_item = sprintf(
247
+ '<select name="vfb-%1$d" id="%2$s" class="vfb-select %3$s %4$s %5$s">%6$s</select>',
248
+ absint( $field->field_id ),
249
+ $id_attr,
250
+ $size,
251
+ $required,
252
+ $css,
253
+ $options
254
+ );
255
+
256
+ $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
257
+
258
+ break;
259
 
260
+ case 'radio' :
261
+
262
+ $field_options = maybe_unserialize( $field->field_options );
263
+
264
+ $options = '';
265
+
266
+ // Loop through each option and output
267
+ foreach ( $field_options as $option => $value ) {
268
+ $options .= sprintf(
269
+ '<span><input type="radio" name="vfb-%1$d" id="%2$s-%3$d" value="%6$s" class="vfb-radio %4$s %5$s"%7$s /><label for="%2$s-%3$d" class="vfb-choice">%6$s</label></span>',
 
 
 
 
 
 
 
 
270
  absint( $field->field_id ),
271
  $id_attr,
272
+ $option,
 
273
  $required,
 
274
  $css,
275
+ trim( stripslashes( $value ) ),
276
+ checked( $default, ++$option, 0 )
277
  );
278
+ }
 
 
 
279
 
280
+ $form_item = $options;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
 
282
+ $output .= '<div>';
283
+
284
+ $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
285
+
286
+ $output .= '<div style="clear:both"></div></div>';
287
+
288
+ break;
289
+
290
+ case 'checkbox' :
291
+
292
+ $field_options = maybe_unserialize( $field->field_options );
293
+
294
+ $options = '';
295
+
296
+ // Loop through each option and output
297
+ foreach ( $field_options as $option => $value ) {
298
+ $options .= sprintf(
299
+ '<span><input type="checkbox" name="vfb-%1$d[]" id="%2$s-%3$d" value="%6$s" class="vfb-checkbox %4$s %5$s"%7$s /><label for="%2$s-%3$d" class="vfb-choice">%6$s</label></span>',
300
  absint( $field->field_id ),
301
  $id_attr,
302
+ $option,
303
  $required,
304
  $css,
305
+ trim( stripslashes( $value ) ),
306
+ checked( $default, ++$option, 0 )
307
  );
308
+ }
 
 
 
309
 
310
+ $form_item = $options;
311
+
312
+ $output .= '<div>';
313
+
314
+ $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
315
+
316
+ $output .= '<div style="clear:both"></div></div>';
317
+
318
+ break;
319
+
320
+ case 'address' :
321
+
322
+ $address = '';
323
+
324
+ $address_parts = array(
325
+ 'address' => array(
326
+ 'label' => __( 'Address', 'visual-form-builder-pro' ),
327
+ 'layout' => 'full'
328
+ ),
329
+ 'address-2' => array(
330
+ 'label' => __( 'Address Line 2', 'visual-form-builder-pro' ),
331
+ 'layout' => 'full'
332
+ ),
333
+ 'city' => array(
334
+ 'label' => __( 'City', 'visual-form-builder-pro' ),
335
+ 'layout' => 'left'
336
+ ),
337
+ 'state' => array(
338
+ 'label' => __( 'State / Province / Region', 'visual-form-builder-pro' ),
339
+ 'layout' => 'right'
340
+ ),
341
+ 'zip' => array(
342
+ 'label' => __( 'Postal / Zip Code', 'visual-form-builder-pro' ),
343
+ 'layout' => 'left'
344
+ ),
345
+ 'country' => array(
346
+ 'label' => __( 'Country', 'visual-form-builder-pro' ),
347
+ 'layout' => 'right'
348
+ )
349
+ );
350
+
351
+ $address_parts = apply_filters( 'vfb_address_labels', $address_parts, $form_id );
352
+
353
+ foreach ( $address_parts as $parts => $part ) :
354
 
355
+ // Make sure the second address line is not required
356
+ $addr_required = ( 'address-2' !== $parts ) ? $required : '';
357
 
358
+ if ( 'country' == $parts ) :
359
+
360
+ $options = '';
361
+
362
+ foreach ( $this->countries as $country ) {
363
+ $options .= sprintf( '<option value="%1$s"%2$s>%1$s</option>', $country, selected( $default, $country, 0 ) );
364
+ }
365
+
366
+ $address .= sprintf(
367
+ '<span class="vfb-%3$s"><select name="vfb-%1$d[%4$s]" class="vfb-select %7$s %8$s" id="%2$s-%4$s">%6$s</select><label for="%2$s-%4$s">%5$s</label></span>',
368
  absint( $field->field_id ),
369
  $id_attr,
370
+ $part['layout'],
371
+ $parts,
372
+ $part['label'],
373
+ $options,
374
+ $addr_required,
375
+ $css
376
  );
377
+
378
+ else :
379
+
380
+ $address .= sprintf(
381
+ '<span class="vfb-%3$s"><input type="text" name="vfb-%1$d[%4$s]" id="%2$s-%4$s" maxlength="150" class="vfb-text vfb-medium %7$s %8$s" /><label for="%2$s-%4$s">%5$s</label></span>',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  absint( $field->field_id ),
383
  $id_attr,
384
+ $part['layout'],
385
+ $parts,
386
+ $part['label'],
387
+ $size,
388
+ $addr_required,
389
+ $css
390
  );
 
391
 
392
+ endif;
393
 
394
+ endforeach;
 
 
 
 
395
 
396
+ $output .= "<div>$address</div>";
397
 
398
+ break;
399
+
400
+ case 'date' :
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
 
402
+ $form_item = sprintf(
403
+ '<input type="text" name="vfb-%1$d" id="%2$s" value="%3$s" class="vfb-text vfb-date-picker %4$s %5$s %6$s" />',
404
+ absint( $field->field_id ),
405
+ $id_attr,
406
+ $default,
407
+ $size,
408
+ $required,
409
+ $css
410
+ );
 
 
 
 
 
 
411
 
412
+ $output .= ( !empty( $description ) ) ? sprintf( '<span>%1$s<label>%2$s</label></span>', $form_item, $description ) : $form_item;
413
+
414
+ break;
415
+
416
+ case 'time' :
417
+
418
+ $hour = $minute = $ampm = '';
419
+
420
+ // Get the time format (12 or 24)
421
+ $time_format = str_replace( 'time-', '', $validation );
422
+
423
+ $time_format = apply_filters( 'vfb_time_format', $time_format, $form_id );
424
+ $total_mins = apply_filters( 'vfb_time_min_total', 55, $form_id );
425
+ $min_interval = apply_filters( 'vfb_time_min_interval', 5, $form_id );
426
+
427
+ // Set whether we start with 0 or 1 and how many total hours
428
+ $hour_start = ( $time_format == '12' ) ? 1 : 0;
429
+ $hour_total = ( $time_format == '12' ) ? 12 : 23;
430
+
431
+ // Hour
432
+ for ( $i = $hour_start; $i <= $hour_total; $i++ ) {
433
+ $hour .= sprintf( '<option value="%1$02d">%1$02d</option>', $i );
434
+ }
435
+
436
+ // Minute
437
+ for ( $i = 0; $i <= $total_mins; $i += $min_interval ) {
438
+ $minute .= sprintf( '<option value="%1$02d">%1$02d</option>', $i );
439
+ }
440
+
441
+ // AM/PM
442
+ if ( $time_format == '12' ) {
443
+ $ampm = sprintf(
444
+ '<span class="vfb-time"><select name="vfb-%1$d[ampm]" id="%2$s-ampm" class="vfb-select %5$s %6$s"><option value="AM">AM</option><option value="PM">PM</option></select><label for="%2$s-ampm">AM/PM</label></span>',
 
 
 
 
 
 
 
 
 
445
  absint( $field->field_id ),
446
  $id_attr,
447
  $hour,
448
  $minute,
449
  $required,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  $css
451
+ );
452
+ }
 
 
 
453
 
454
+ $form_item = sprintf(
455
+ '<span class="vfb-time"><select name="vfb-%1$d[hour]" id="%2$s-hour" class="vfb-select %5$s %6$s">%3$s</select><label for="%2$s-hour">HH</label></span>' .
456
+ '<span class="vfb-time"><select name="vfb-%1$d[min]" id="%2$s-min" class="vfb-select %5$s %6$s">%4$s</select><label for="%2$s-min">MM</label></span>' .
457
+ '%7$s',
458
+ absint( $field->field_id ),
459
+ $id_attr,
460
+ $hour,
461
+ $minute,
462
+ $required,
463
+ $css,
464
+ $ampm
465
+ );
 
 
 
 
 
 
 
 
 
466
 
467
+ $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
 
 
468
 
469
+ $output .= '<div class="clear"></div>';
470
 
471
+ break;
472
+
473
+ case 'html' :
474
+
475
+ $form_item = sprintf(
476
+ '<script type="text/javascript">edToolbar("%2$s");</script>' .
477
+ '<textarea name="vfb-%1$d" id="%2$s" class="vfb-textarea vfbEditor %4$s %5$s %6$s">%3$s</textarea>',
478
+ absint( $field->field_id ),
479
+ $id_attr,
480
+ $default,
481
+ $size,
482
+ $required,
483
+ $css
484
+ );
485
+
486
+ $output .= '<div>';
487
+
488
+ $output .= ( !empty( $description ) ) ? sprintf( '<span><label>%2$s</label></span>%1$s', $form_item, $description ) : $form_item;
489
+
490
+ $output .= '</div>';
491
 
492
+ break;
493
+
494
+ case 'file-upload' :
495
 
496
+ $options = maybe_unserialize( $field->field_options );
497
+ $accept = ( !empty( $options[0] ) ) ? " {accept:'$options[0]'}" : '';
498
+
499
+
500
+ $form_item = sprintf(
501
+ '<input type="file" name="vfb-%1$d" id="%2$s" value="%3$s" class="vfb-text %4$s %5$s %6$s %7$s %8$s" />',
502
+ absint( $field->field_id ),
503
+ $id_attr,
504
+ $default,
505
+ $size,
506
+ $required,
507
+ $validation,
508
+ $css,
509
+ $accept
510
+ );
511
+
512
+ $output .= ( !empty( $description ) ) ? sprintf( '<span>%1$s<label>%2$s</label></span>', $form_item, $description ) : $form_item;
513
+
514
+ break;
515
+
516
+ case 'instructions' :
517
+
518
+ $output .= wp_specialchars_decode( esc_html( stripslashes( $field->field_description ) ), ENT_QUOTES );
519
+
520
+ break;
521
+
522
+ case 'submit' :
523
+
524
+ $submit = sprintf(
525
+ '<li class="vfb-item vfb-item-submit" id="%2$s"><input type="submit" name="visual-form-builder-submit" value="%1$s" class="vfb-submit %3$s" id="sendmail" /></li>',
526
+ esc_attr( stripslashes( $field->field_name ) ),
527
+ $id_attr,
528
+ $css
529
+ );
530
+
531
+ break;
532
+
533
+ default:
534
+ echo '';
535
  }
536
+
537
+ // Closing </li>
538
+ $output .= ( !in_array( $field_type , array( 'verification', 'secret', 'submit', 'fieldset', 'section' ) ) ) ? '</li>' : '';
539
+ endforeach;
540
+
541
+
542
+ // Close user-added fields
543
+ $output .= '</ul><br /></fieldset>';
544
+
545
+ // Make sure the verification displays even if they have not updated their form
546
+ if ( empty( $verification ) ) :
547
 
548
+ $verification = sprintf(
549
+ '<fieldset class="vfb-fieldset vfb-verification">
550
+ <div class="vfb-legend"><h3>%1$s</h3></div>
551
+ <ul class="vfb-section vfb-section-%2$d">
552
+ <li class="vfb-item vfb-item-text">
553
+ <label for="vfb-secret" class="vfb-desc">%3$s<span>*</span></label>
554
+ <div><input type="text" name="vfb-secret" id="vfb-secret" class="vfb-text vfb-medium" /></div>
555
+ </li>',
556
+ __( 'Verification' , 'visual-form-builder'),
557
+ $count,
558
+ __( 'Please enter any two digits with <strong>no</strong> spaces (Example: 12)' , 'visual-form-builder')
559
+ );
560
 
561
+ endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
 
563
+ // Output our security test
564
+ $output .= sprintf(
565
+ $verification .
566
+ '<li style="display:none;"><label for="vfb-spam">%1$s:</label><div><input name="vfb-spam" id="vfb-spam" /></div></li>
567
+ %2$s</ul>
568
+ </fieldset>
569
+ </form>
570
+ </div>',
571
+ __( 'This box is for spam protection - <strong>please leave it blank</strong>' , 'visual-form-builder'),
572
+ $submit
573
+ );
574
  ?>
js/vfb-admin.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(document).ready(function(f){if(pagenow=="toplevel_page_visual-form-builder"){f(".if-js-closed").removeClass("if-js-closed").addClass("closed");postboxes.add_postbox_toggles("toplevel_page_visual-form-builder")}var a=null;f(document).on("mouseenter mouseleave",".vfb-tooltip",function(k){if(k.type=="mouseenter"){if(a){clearTimeout(a);a=null}var h=f(this).attr("title"),j=f(this).attr("rel"),i=f(this).width();f(this).append('<div class="tooltip"><h3>'+h+'</h3><p class="text">'+j+"</p></div>");f.data(this,"title",h);this.title="";f(this).find(".tooltip").css({left:i+22});a=setTimeout(function(){f(".tooltip").fadeIn(300)},500)}else{this.title=f.data(this,"title");f(".tooltip").fadeOut(500);f(this).children().remove()}});f(document).on("click","a.addOption",function(n){n.preventDefault();var i=f(this).parent().parent().find(".clonedOption").length;var m=i+1;var o=f(this).closest("div").attr("id");var l=f(this).closest("div").children("label").attr("for");var h=l.replace(new RegExp(/(\d+)$/g),"");var k=o.replace(new RegExp(/(\d+)$/g),"");var j=f("#"+o).clone().attr("id",k+m);j.children("label").attr("for",h+m);j.find('input[type="text"]').attr("id",h+m);j.find('input[type="radio"]').attr("value",m);f("#"+k+i).after(j)});f(document).on("click","a.deleteOption",function(i){i.preventDefault();var h=f(this).parent().parent().find(".clonedOption").length;if(h-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(document).on("click","a.addEmail",function(n){n.preventDefault();var i=f(this).closest("#email-details").find(".clonedOption").length;var m=i+1;var o=f(this).closest("div").attr("id");var l=f(this).closest("div").find("label").attr("for");var h=l.replace(new RegExp(/(\d+)$/g),"");var k=o.replace(new RegExp(/(\d+)$/g),"");var j=f("#"+o).clone().attr("id",k+m);j.find("label").attr("for",h+m);j.find("input").attr("id",h+m);f("#"+k+i).after(j)});f(document).on("click","a.deleteEmail",function(i){i.preventDefault();var h=f(this).closest("#email-details").find(".clonedOption").length;if(h-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(".menu-delete, .entry-delete").click(function(){var h=(f(this).hasClass("entry-delete"))?"entry":"form";var i=confirm("You are about to permanently delete this "+h+" and all of its data.\n'Cancel' to stop, 'OK' to delete.");if(i){return true}return false});f(document).on("click","a.item-edit",function(h){h.preventDefault();f(h.target).closest("li").children(".menu-item-settings").slideToggle("fast");f(this).toggleClass("opened")});function b(h){if("FIELDSET"!==h){f("#vfb-fieldset-first-warning").show()}else{f("#vfb-fieldset-first-warning").hide()}}f("#menu-to-edit").nestedSortable({listType:"ul",maxLevels:3,handle:".menu-item-handle",placeholder:"sortable-placeholder",forcePlaceholderSize:true,forceHelperSize:true,tolerance:"pointer",toleranceElement:"> dl",items:"li:not(.ui-state-disabled)",create:function(h,i){f(this).css("min-height",f(this).height())},start:function(h,i){i.placeholder.height(i.item.height())},stop:function(i,j){var h=f("#menu-to-edit .item-type:first").text();opts={url:ajaxurl,type:"POST",async:true,cache:false,dataType:"json",data:{action:"visual_form_builder_process_sort",order:f(this).nestedSortable("toArray")},success:function(k){f("#loading-animation").hide();b(h);return}};f.ajax(opts)}});f("#form-items .vfb-draggable-form-items").click(function(h){h.preventDefault();f(this).data("submit_value",f(this).text())});f(document).on("click","#form-items .vfb-draggable-form-items",function(j){j.preventDefault();var k=f(this).closest("form").serializeArray(),i=f(this).data("submit_value"),h=f("#menu-to-edit li.ui-state-disabled:first").attr("id").match(new RegExp(/(\d+)$/g))[0];f("img.waiting").show();f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_create_field",data:k,field_type:i,previous:h,page:pagenow,nonce:f("#_wpnonce").val()},success:function(l){f("img.waiting").hide();f(l).hide().insertBefore("#menu-to-edit li.ui-state-disabled:first").fadeIn();return},error:function(m,n,l){alert(m+" "+n+" "+l);return}})});f(document).on("click","a.item-delete",function(p){p.preventDefault();var m=childs=new Array(),u=0,j=f(this).attr("href"),h=j.split("&"),o=confirm("You are about to permanently delete this field.\n'Cancel' to stop, 'OK' to delete.");if(!o){return false}for(var n=0;n<h.length;n++){var r=h[n].indexOf("=");var q=h[n].substring(0,r);var s=h[n].substring(r+1);m[q]=s}var k=f(this).closest(".form-item").find("ul").children();var l=k.parent().html();k.each(function(t){childs[t]=f(this).attr("id").match(new RegExp(/(\d+)$/g))[0]});var v=f(this).closest("li.form-item").parents("li.form-item");if(v.length){u=v.attr("id").match(new RegExp(/(\d+)$/g))[0]}f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_delete_field",form:m.form,field:m.field,child_ids:childs,parent_id:u,page:pagenow,nonce:m._wpnonce},success:function(i){f("#form_item_"+m.field).addClass("deleting").animate({opacity:0,height:0},350,function(){f(this).before(l).remove()});return},error:function(t,w,i){alert("There was an error loading the content");return}})});f("#form-settings-button").click(function(j){j.preventDefault();f(this).toggleClass("current");f("#form-settings").slideToggle();var h=f('input[name="form_id"]').val(),i=(f(this).hasClass("current"))?"opened":"closed";f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,data:{action:"visual_form_builder_form_settings",form:h,status:i,page:pagenow},success:function(k){if(i=="closed"){f(".settings-links").removeClass("on");f(".settings-links:first").addClass("on");f(".form-details").slideUp("normal");f(".form-details:first").show("normal")}},error:function(l,m,k){alert("There was an error loading the content");return}})});f(".settings-links").click(function(j){j.preventDefault();f(".settings-links").removeClass("on");f(".form-details").slideUp("normal");if(f(this).next("div").is(":hidden")==true){f(this).addClass("on");f(this).next().slideDown("normal")}var i=f('input[name="form_id"]').val(),h=this.hash.replace(/#/g,"");f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,data:{action:"visual_form_builder_form_settings",form:i,accordion:h,page:pagenow},success:function(k){},error:function(l,m,k){alert("There was an error loading the content");return}})});if(f(".columns-2 #side-sortables").length>0){var e=f("#vfb_form_items_meta_box"),g=e.offset(),c=55;f(window).on("scroll",function(){if(f(window).scrollTop()>g.top){e.stop().css({marginTop:f(window).scrollTop()-g.top+c})}else{e.stop().css({marginTop:0})}})}var d=f(".form-success-type:checked").val();f("#form-success-message-"+d).show();f(".form-success-type").change(function(){var h=f(this).val();if("text"==h){f("#form-success-message-text").show();f("#form-success-message-page, #form-success-message-redirect").hide()}else{if("page"==h){f("#form-success-message-page").show();f("#form-success-message-text, #form-success-message-redirect").hide()}else{if("redirect"==h){f("#form-success-message-redirect").show();f("#form-success-message-text, #form-success-message-page").hide()}}}});f(".vfb-field-types").click(function(i){i.preventDefault();f("#vfb-field-tabs li").removeClass("tabs");f(this).parent().addClass("tabs");f(".tabs-panel-active").removeClass("tabs-panel-active").addClass("tabs-panel-inactive");var h=this.hash;f(h).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")});f("#visual-form-builder-update").validate({rules:{"form_email_to[]":{email:true},form_email_from:{email:true},form_success_message_redirect:{url:true},form_notification_email_name:{required:function(h){return f("#form-notification-setting").is(":checked")}},form_notification_email_from:{required:function(h){return f("#form-notification-setting").is(":checked")},email:true},form_notification_email:{required:function(h){return f("#form-notification-setting").is(":checked")}}},errorPlacement:function(h,i){h.insertAfter(i.parent())}});f("#visual-form-builder-new-form").validate();f("#form_email_from_name_override").change(function(){if(f("#form_email_from_name_override").val()==""){f("#form-email-sender-name").prop("readonly",false)}else{f("#form-email-sender-name").prop("readonly","readonly")}});f("#form_email_from_override").change(function(){if(f("#form_email_from_override").val()==""){f("#form-email-sender").prop("readonly",false)}else{f("#form-email-sender").prop("readonly","readonly")}});if(f("#form-notification-setting").is(":checked")){f("#notification-email").show()}else{f("#notification-email").hide()}f("#form-notification-setting").change(function(){var h=f(this).is(":checked");if(h){f("#notification-email").show();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").prop("disabled",false)}else{f("#notification-email").hide();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").prop("disabled","disabled")}});f("#vfb-export-select-all").click(function(h){h.preventDefault();f('#vfb-export-entries-fields input[type="checkbox"]').prop("checked",true)});f(document).on("change","#vfb-export-entries-forms",function(){var h=f(this).val();f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_export_load_options",id:h,page:pagenow},success:function(i){f("#vfb-export-entries-fields").html(i)},error:function(j,k,i){alert(j+" "+k+" "+i);return}})})});
js/{visual-form-builder-validate.js → vfb-validation.js} RENAMED
File without changes
js/visual-form-builder.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(f){if(pagenow=="toplevel_page_visual-form-builder"){f(".if-js-closed").removeClass("if-js-closed").addClass("closed");postboxes.add_postbox_toggles("toplevel_page_visual-form-builder")}var a=null;f(document).on("mouseenter mouseleave",".vfb-tooltip",function(l){if(l.type=="mouseenter"){if(a){clearTimeout(a);a=null}var i=f(this).attr("title"),k=f(this).attr("rel"),j=f(this).width();f(this).append('<div class="tooltip"><h3>'+i+'</h3><p class="text">'+k+"</p></div>");f.data(this,"title",i);this.title="";f(this).find(".tooltip").css({left:j+22});a=setTimeout(function(){f(".tooltip").fadeIn(300)},500)}else{this.title=f.data(this,"title");f(".tooltip").fadeOut(500);f(this).children().remove()}});f(document).on("click","a.addOption",function(o){o.preventDefault();var j=f(this).parent().parent().find(".clonedOption").length;var n=j+1;var p=f(this).closest("div").attr("id");var m=f(this).closest("div").children("label").attr("for");var i=m.replace(new RegExp(/(\d+)$/g),"");var l=p.replace(new RegExp(/(\d+)$/g),"");var k=f("#"+p).clone().attr("id",l+n);k.children("label").attr("for",i+n);k.find('input[type="text"]').attr("id",i+n);k.find('input[type="radio"]').attr("value",n);f("#"+l+j).after(k)});f(document).on("click","a.deleteOption",function(j){j.preventDefault();var i=f(this).parent().parent().find(".clonedOption").length;if(i-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(document).on("click","a.addEmail",function(o){o.preventDefault();var j=f(this).closest("#email-details").find(".clonedOption").length;var n=j+1;var p=f(this).closest("div").attr("id");var m=f(this).closest("div").find("label").attr("for");var i=m.replace(new RegExp(/(\d+)$/g),"");var l=p.replace(new RegExp(/(\d+)$/g),"");var k=f("#"+p).clone().attr("id",l+n);k.find("label").attr("for",i+n);k.find("input").attr("id",i+n);f("#"+l+j).after(k)});f(document).on("click","a.deleteEmail",function(j){j.preventDefault();var i=f(this).closest("#email-details").find(".clonedOption").length;if(i-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(".menu-delete, .entry-delete").click(function(){var i=(f(this).hasClass("entry-delete"))?"entry":"form";var j=confirm("You are about to permanently delete this "+i+" and all of its data.\n'Cancel' to stop, 'OK' to delete.");if(j){return true}return false});f(document).on("click","a.item-edit",function(i){i.preventDefault();f(i.target).closest("li").children(".menu-item-settings").slideToggle("fast");f(this).toggleClass("opened")});var h=f("#menu-to-edit .item-type:first").text();b(h);function b(i){if("FIELDSET"!==i){f("#vfb-fieldset-first-warning").show()}else{f("#vfb-fieldset-first-warning").hide()}}f("#menu-to-edit").nestedSortable({listType:"ul",maxLevels:3,handle:".menu-item-handle",placeholder:"sortable-placeholder",forcePlaceholderSize:true,forceHelperSize:true,tolerance:"pointer",toleranceElement:"> dl",items:"li:not( .ui-state-disabled )",create:function(i,j){f(this).css("min-height",f(this).height())},start:function(i,j){j.placeholder.height(j.item.height())},stop:function(j,k){var i=f("#menu-to-edit .item-type:first").text();opts={url:ajaxurl,type:"POST",async:true,cache:false,dataType:"json",data:{action:"visual_form_builder_process_sort",order:f(this).nestedSortable("toArray")},success:function(m){f("#loading-animation").hide();b(i);return}};f.ajax(opts)}});f("#form-items .vfb-draggable-form-items").click(function(i){i.preventDefault();f(this).data("submit_value",f(this).text())});f(document).on("click","#form-items .vfb-draggable-form-items",function(k){k.preventDefault();var l=f(this).closest("form").serializeArray(),j=f(this).data("submit_value"),i=f("#menu-to-edit li.ui-state-disabled:first").attr("id").match(new RegExp(/(\d+)$/g))[0];f("img.waiting").show();f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_create_field",data:l,field_type:j,previous:i,page:pagenow,nonce:f("#_wpnonce").val()},success:function(m){f("img.waiting").hide();f(m).hide().insertBefore("#menu-to-edit li.ui-state-disabled:first").fadeIn();return},error:function(n,o,m){alert(n+" "+o+" "+m);return}})});f(document).on("click","a.item-delete",function(q){q.preventDefault();var n=childs=new Array(),v=0,k=f(this).attr("href"),j=k.split("&"),p=confirm("You are about to permanently delete this field.\n'Cancel' to stop, 'OK' to delete.");if(!p){return false}for(var o=0;o<j.length;o++){var s=j[o].indexOf("=");var r=j[o].substring(0,s);var u=j[o].substring(s+1);n[r]=u}var l=f(this).closest(".form-item").find("ul").children();var m=l.parent().html();l.each(function(t){childs[t]=f(this).attr("id").match(new RegExp(/(\d+)$/g))[0]});var w=f(this).closest("li.form-item").parents("li.form-item");if(w.length){v=w.attr("id").match(new RegExp(/(\d+)$/g))[0]}f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_delete_field",form:n.form,field:n.field,child_ids:childs,parent_id:v,page:pagenow,nonce:n._wpnonce},success:function(i){f("#form_item_"+n.field).addClass("deleting").animate({opacity:0,height:0},350,function(){f(this).before(m).remove()});return},error:function(t,x,i){alert("There was an error loading the content");return}})});f("#form-settings-button").click(function(k){k.preventDefault();f(this).toggleClass("current");f("#form-settings").slideToggle();var i=f('input[name="form_id"]').val(),j=(f(this).hasClass("current"))?"opened":"closed";f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,data:{action:"visual_form_builder_form_settings",form:i,status:j,page:pagenow},success:function(l){if(j=="closed"){f(".settings-links").removeClass("on");f(".settings-links:first").addClass("on");f(".form-details").slideUp("normal");f(".form-details:first").show("normal")}},error:function(m,n,l){alert("There was an error loading the content");return}})});f(".settings-links").click(function(k){k.preventDefault();f(".settings-links").removeClass("on");f(".form-details").slideUp("normal");if(f(this).next("div").is(":hidden")==true){f(this).addClass("on");f(this).next().slideDown("normal")}var j=f('input[name="form_id"]').val(),i=this.hash.replace(/#/g,"");f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,data:{action:"visual_form_builder_form_settings",form:j,accordion:i,page:pagenow},success:function(l){},error:function(m,n,l){alert("There was an error loading the content");return}})});if(f(".columns-2 #side-sortables").length>0){var e=f("#vfb_form_items_meta_box"),g=e.offset(),c=55;f(window).on("scroll",function(){if(f(window).scrollTop()>g.top){e.stop().css({marginTop:f(window).scrollTop()-g.top+c})}else{e.stop().css({marginTop:0})}})}var d=f(".form-success-type:checked").val();f("#form-success-message-"+d).show();f(".form-success-type").change(function(){var i=f(this).val();if("text"==i){f("#form-success-message-text").show();f("#form-success-message-page, #form-success-message-redirect").hide()}else{if("page"==i){f("#form-success-message-page").show();f("#form-success-message-text, #form-success-message-redirect").hide()}else{if("redirect"==i){f("#form-success-message-redirect").show();f("#form-success-message-text, #form-success-message-page").hide()}}}});f(".vfb-field-types").click(function(j){j.preventDefault();f("#vfb-field-tabs li").removeClass("tabs");f(this).parent().addClass("tabs");f(".tabs-panel-active").removeClass("tabs-panel-active").addClass("tabs-panel-inactive");var i=this.hash;f(i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")});f("#visual-form-builder-update").validate({rules:{"form_email_to[]":{email:true},form_email_from:{email:true},form_success_message_redirect:{url:true},form_notification_email_name:{required:function(i){return f("#form-notification-setting").is(":checked")}},form_notification_email_from:{required:function(i){return f("#form-notification-setting").is(":checked")},email:true},form_notification_email:{required:function(i){return f("#form-notification-setting").is(":checked")}}},errorPlacement:function(i,j){i.insertAfter(j.parent())}});f("#visual-form-builder-new-form").validate();f("#vfb-export-select-all").click(function(i){i.preventDefault();f('#vfb-export-entries-fields input[type="checkbox"]').prop("checked",true)});f(document).on("change","#vfb-export-entries-forms",function(){var i=f(this).prop("value");f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_export_load_options",id:i,page:pagenow},success:function(j){f("#vfb-export-entries-fields").html(j)},error:function(k,l,j){alert(k+" "+l+" "+j);return}})});f("#form_email_from_name_override").change(function(){if(f("#form_email_from_name_override").val()==""){f("#form-email-sender-name").attr("readonly",false)}else{f("#form-email-sender-name").attr("readonly","readonly")}});f("#form_email_from_override").change(function(){if(f("#form_email_from_override").val()==""){f("#form-email-sender").attr("readonly",false)}else{f("#form-email-sender").attr("readonly","readonly")}});if(f("#form-notification-setting").is(":checked")){f("#notification-email").show()}else{f("#notification-email").hide()}f("#form-notification-setting").change(function(){var i=f(this).is(":checked");if(i){f("#notification-email").show();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled",false)}else{f("#notification-email").hide();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled","disabled")}})});
 
languages/visual-form-builder.pot CHANGED
@@ -1,400 +1,837 @@
 
 
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Visual Form Builder\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-10-06 13:57-0600\n"
6
- "PO-Revision-Date: 2011-10-06 13:58-0600\n"
7
- "Last-Translator: Matthew Muro <fuzzboxer@gmail.com>\n"
8
- "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SearchPath-0: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder\n"
15
 
16
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  msgid "Details"
18
  msgstr ""
19
 
20
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:46
21
  msgid "Form Title"
22
  msgstr ""
23
 
24
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:49
25
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:98
26
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:222
27
  msgid "Date Submitted"
28
  msgstr ""
29
 
30
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:52
31
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:97
32
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:226
33
  msgid "IP Address"
34
  msgstr ""
35
 
36
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:55
37
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:93
38
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:230
39
  msgid "Email Subject"
40
  msgstr ""
41
 
42
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:58
43
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:94
44
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:234
45
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:817
46
  msgid "Sender Name"
47
  msgstr ""
48
 
49
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:61
50
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:95
51
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:238
52
  msgid "Sender Email"
53
  msgstr ""
54
 
55
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:64
56
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:96
57
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:242
58
  msgid "Emailed To"
59
  msgstr ""
60
 
61
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:84
62
- msgid "Entry"
63
  msgstr ""
64
 
65
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:67
66
- msgid "Cancel"
67
  msgstr ""
68
 
69
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:92
70
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:218
71
- msgid "Form"
72
  msgstr ""
73
 
74
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:168
75
- msgid "Delete"
 
 
 
 
 
 
 
 
76
  msgstr ""
77
 
78
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:169
79
- msgid "Export All"
 
 
 
 
 
 
80
  msgstr ""
81
 
82
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:170
83
- msgid "Export Selected"
84
  msgstr ""
85
 
86
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:214
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  msgid "Entries ID"
88
  msgstr ""
89
 
90
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:369
91
- msgid "View all forms"
92
  msgstr ""
93
 
94
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:376
95
- msgid "Filter"
96
  msgstr ""
97
 
98
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:340
99
- msgid "Settings"
100
  msgstr ""
101
 
102
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:353
103
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:643
104
- msgid "Visual Form Builder"
 
 
 
105
  msgstr ""
106
 
107
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:383
108
- #, php-format
109
- msgid "<div id=\"message\" class=\"updated\"><p>The <strong>%s</strong> form has been created.</p></div>"
110
  msgstr ""
111
 
112
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:499
113
- #, php-format
114
- msgid "<div id=\"message\" class=\"updated\"><p>The <strong>%s</strong> form has been updated.</p></div>"
115
  msgstr ""
116
 
117
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:645
 
 
 
 
118
  msgid "Forms"
119
  msgstr ""
120
 
121
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:646
 
 
 
 
 
122
  msgid "Entries"
123
  msgstr ""
124
 
125
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:685
126
- msgid "Form Items"
127
  msgstr ""
128
 
129
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:688
130
- msgid "Click"
131
  msgstr ""
132
 
133
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:688
134
- msgid "to Add a Field"
135
  msgstr ""
136
 
137
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:712
138
- msgid "Form Output"
139
  msgstr ""
140
 
141
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:715
142
- msgid "Copy this shortcode and paste into any Post or Page."
143
  msgstr ""
144
 
145
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:794
146
- msgid "Form Name"
147
  msgstr ""
148
 
149
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:804
150
- msgid "Customize Email Details"
151
  msgstr ""
152
 
153
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:804
154
- msgid "Email Details"
155
  msgstr ""
156
 
157
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:805
158
- msgid "Customize Confirmation Message"
159
  msgstr ""
160
 
161
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:805
162
- msgid "Confirmation"
163
  msgstr ""
164
 
165
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:806
166
- msgid "Customize Notification Email"
167
  msgstr ""
168
 
169
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:806
170
- msgid "Notification"
171
  msgstr ""
172
 
173
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:810
174
- msgid "The forms you build here will send information to one or more email addresses when submitted by a user on your site. Use the fields below to customize the details of that email."
175
  msgstr ""
176
 
177
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:812
178
- msgid "E-mail Subject"
179
  msgstr ""
180
 
181
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:822
182
- msgid "Select a required text field"
183
  msgstr ""
184
 
185
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:831
186
- msgid "Sender E-mail"
187
  msgstr ""
188
 
189
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:834
190
- msgid "OR"
191
  msgstr ""
192
 
193
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:836
194
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:899
195
- msgid "Select a required text field with email validation"
196
  msgstr ""
197
 
198
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:845
199
- msgid "E-mail(s) To"
200
  msgstr ""
201
 
202
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:848
203
- msgid "(multiple emails separated by commas)"
204
  msgstr ""
205
 
206
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:852
207
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:888
208
- msgid "After someone submits a form, you can control what is displayed. By default, it's a message but you can send them to another WordPress Page or a custom URL."
209
  msgstr ""
210
 
211
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:855
212
- msgid "Text"
213
  msgstr ""
214
 
215
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:859
216
- msgid "Page"
217
  msgstr ""
218
 
219
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:863
220
- msgid "Redirect"
221
  msgstr ""
222
 
223
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:870
224
- msgid "Your form was successfully submitted. Thank you for contacting us."
225
  msgstr ""
226
 
227
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:879
228
- msgid "Select a Page"
229
  msgstr ""
230
 
231
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:891
232
- msgid "Send Confirmation Email to User"
233
  msgstr ""
234
 
235
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:896
236
- msgid "Send To"
237
  msgstr ""
238
 
239
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:908
240
- msgid "Subject"
241
  msgstr ""
242
 
243
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:912
244
- msgid "Message"
245
  msgstr ""
246
 
247
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:918
248
- msgid "Include a Copy of the User's Entry"
249
  msgstr ""
250
 
251
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:925
252
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1072
253
- msgid "Create Form"
254
  msgstr ""
255
 
256
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:925
257
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1072
258
- msgid "Save Form"
259
  msgstr ""
260
 
261
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:929
262
- msgid "Delete Form"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  msgstr ""
264
 
265
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:939
266
- msgid "To create a custom form, give it a name above and click Create Form. Then choose form elements from the left column to add to this form."
267
  msgstr ""
268
 
269
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:940
270
- msgid "After you have added your items, drag and drop to put them in the order you want. You can also click each item to reveal additional configuration options."
271
  msgstr ""
272
 
273
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:941
274
- msgid "When you have finished building your custom form, make sure you click the Save Form button."
275
  msgstr ""
276
 
277
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:942
278
- msgid "For more help, click on the Help tab at the top of this page."
279
  msgstr ""
280
 
281
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:948
282
- msgid "Select form inputs from the box at left to begin building your custom form. An initial fieldset has been automatically added to get you started."
283
  msgstr ""
284
 
285
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:964
 
 
 
 
286
  msgid "Edit Field Item"
287
  msgstr ""
288
 
289
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:979
 
 
 
 
 
290
  msgid "Name"
291
  msgstr ""
292
 
293
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:985
 
 
 
 
294
  msgid "Description"
295
  msgstr ""
296
 
297
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1003
298
- msgid "Options (separated by commas)"
299
  msgstr ""
300
 
301
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1018
 
 
 
 
 
 
 
 
302
  msgid "12 Hour Format"
303
  msgstr ""
304
 
305
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1019
306
  msgid "24 Hour Format"
307
  msgstr ""
308
 
309
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1021
310
  msgid "None"
311
  msgstr ""
312
 
313
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1022
314
  msgid "Email"
315
  msgstr ""
316
 
317
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1023
318
  msgid "URL"
319
  msgstr ""
320
 
321
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1024
322
  msgid "Date"
323
  msgstr ""
324
 
325
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1025
326
  msgid "Number"
327
  msgstr ""
328
 
329
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1026
330
  msgid "Digits"
331
  msgstr ""
332
 
333
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1027
334
  msgid "Phone"
335
  msgstr ""
336
 
337
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1034
338
  msgid "Required"
339
  msgstr ""
340
 
341
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1036
342
  msgid "No"
343
  msgstr ""
344
 
345
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1037
346
  msgid "Yes"
347
  msgstr ""
348
 
349
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1045
350
  msgid "Size"
351
  msgstr ""
352
 
353
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1047
 
 
 
 
354
  msgid "Medium"
355
  msgstr ""
356
 
357
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1048
358
  msgid "Large"
359
  msgstr ""
360
 
361
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1055
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  msgid "Remove"
363
  msgstr ""
364
 
365
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1383
366
- msgid "Verification"
 
 
 
 
367
  msgstr ""
368
 
369
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1387
370
- msgid "Please enter any two digits with"
371
  msgstr ""
372
 
373
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1387
374
- msgid "no"
375
  msgstr ""
376
 
377
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1387
378
- msgid "spaces (Example: 12)"
 
379
  msgstr ""
380
 
381
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1394
382
- msgid "This box is for spam protection"
383
  msgstr ""
384
 
385
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1394
386
- msgid "please leave it blank"
387
  msgstr ""
388
 
389
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1401
390
- msgid "Submit"
391
  msgstr ""
392
 
393
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1427
394
- msgid "Security check"
395
  msgstr ""
396
 
397
- #: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1589
398
- msgid "Ooops! Looks like you have failed the security validation for this form. Please go back and try again."
399
  msgstr ""
400
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Visual Form Builder
2
+ # This file is distributed under the same license as the Visual Form Builder package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Visual Form Builder 2.7\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/visual-form-builder\n"
7
+ "POT-Creation-Date: 2013-02-28 14:40:16+00:00\n"
 
 
 
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: includes/admin-form-creator.php:69
16
+ msgid "Form Name"
17
+ msgstr ""
18
+
19
+ #: includes/admin-form-creator.php:70 includes/admin-new-form.php:17
20
+ msgid "Enter form name here"
21
+ msgstr ""
22
+
23
+ #: includes/admin-form-creator.php:100
24
+ msgid "Form Settings"
25
+ msgstr ""
26
+
27
+ #: includes/admin-form-creator.php:101
28
+ msgid "Duplicate Form"
29
+ msgstr ""
30
+
31
+ #: includes/admin-form-creator.php:102
32
+ msgid "Delete Form"
33
+ msgstr ""
34
+
35
+ #: includes/admin-form-creator.php:112
36
+ msgid "Label Alignment"
37
+ msgstr ""
38
+
39
+ #: includes/admin-form-creator.php:117
40
+ msgid "Top Aligned"
41
+ msgstr ""
42
+
43
+ #: includes/admin-form-creator.php:118
44
+ msgid "Left Aligned"
45
+ msgstr ""
46
+
47
+ #: includes/admin-form-creator.php:119
48
+ msgid "Right Aligned"
49
+ msgstr ""
50
+
51
+ #: includes/admin-form-creator.php:130
52
+ msgid "The forms you build here will send information to one or more email addresses when submitted by a user on your site. Use the fields below to customize the details of that email."
53
+ msgstr ""
54
+
55
+ #: includes/admin-form-creator.php:135 includes/admin-form-creator.php:312
56
+ #: includes/admin-new-form.php:40
57
+ msgid "E-mail Subject"
58
+ msgstr ""
59
+
60
+ #: includes/admin-form-creator.php:146 includes/admin-new-form.php:23
61
+ msgid "Your Name or Company"
62
+ msgstr ""
63
+
64
+ #: includes/admin-form-creator.php:154
65
+ msgid "User's Name (optional)"
66
+ msgstr ""
67
+
68
+ #: includes/admin-form-creator.php:158
69
+ msgid "Select a required text field"
70
+ msgstr ""
71
+
72
+ #: includes/admin-form-creator.php:172 includes/admin-form-creator.php:287
73
+ #: includes/admin-new-form.php:31
74
+ msgid "Reply-To E-mail"
75
+ msgstr ""
76
+
77
+ #: includes/admin-form-creator.php:180
78
+ msgid "User's E-mail (optional)"
79
+ msgstr ""
80
+
81
+ #: includes/admin-form-creator.php:184 includes/admin-form-creator.php:300
82
+ msgid "Select a required email field"
83
+ msgstr ""
84
+
85
+ #: includes/admin-form-creator.php:206
86
+ msgid "E-mail(s) To"
87
+ msgstr ""
88
+
89
+ #: includes/admin-form-creator.php:226
90
+ msgid "After someone submits a form, you can control what is displayed. By default, it's a message but you can send them to another WordPress Page or a custom URL."
91
+ msgstr ""
92
+
93
+ #: includes/admin-form-creator.php:229
94
+ msgid "Text"
95
+ msgstr ""
96
+
97
+ #: includes/admin-form-creator.php:233
98
+ msgid "Page"
99
+ msgstr ""
100
+
101
+ #: includes/admin-form-creator.php:237
102
+ msgid "Redirect"
103
+ msgstr ""
104
+
105
+ #: includes/admin-form-creator.php:246
106
+ msgid "Your form was successfully submitted. Thank you for contacting us."
107
+ msgstr ""
108
+
109
+ #: includes/admin-form-creator.php:256
110
+ msgid "Select a Page"
111
+ msgstr ""
112
+
113
+ #: includes/admin-form-creator.php:269
114
+ msgid "When a user submits their entry, you can send a customizable notification email."
115
+ msgstr ""
116
+
117
+ #: includes/admin-form-creator.php:272
118
+ msgid "Send Confirmation Email to User"
119
+ msgstr ""
120
+
121
+ #: includes/admin-form-creator.php:278
122
+ msgid "Sender Name or Company"
123
+ msgstr ""
124
+
125
+ #: includes/admin-form-creator.php:296 includes/admin-new-form.php:48
126
+ msgid "E-mail To"
127
+ msgstr ""
128
+
129
+ #: includes/admin-form-creator.php:320
130
+ msgid "Message"
131
+ msgstr ""
132
+
133
+ #: includes/admin-form-creator.php:328
134
+ msgid "Include a Copy of the User's Entry"
135
+ msgstr ""
136
+
137
+ #: includes/admin-form-creator.php:337 includes/admin-form-creator.php:356
138
+ msgid "Save Form"
139
+ msgstr ""
140
+
141
+ #: includes/admin-form-creator.php:344
142
+ msgid "Warning &mdash; Missing Fieldset"
143
+ msgstr ""
144
+
145
+ #: includes/admin-form-creator.php:344
146
+ msgid "Your form may not function or display correctly. Please be sure to add or move a Fieldset to the beginning of your form."
147
+ msgstr ""
148
+
149
+ #: includes/admin-new-form.php:7
150
+ msgid "You do not have sufficient permissions to create a new form."
151
+ msgstr ""
152
+
153
+ #: includes/admin-new-form.php:9
154
+ msgid "Create a form"
155
+ msgstr ""
156
+
157
+ #: includes/admin-new-form.php:15
158
+ msgid "Name the form"
159
+ msgstr ""
160
+
161
+ #: includes/admin-new-form.php:18
162
+ msgid "Required. This name is used for admin purposes."
163
+ msgstr ""
164
+
165
+ #: includes/admin-new-form.php:26
166
+ msgid "Required. This is who your emails will come from."
167
+ msgstr ""
168
+
169
+ #: includes/admin-new-form.php:34
170
+ msgid "Required. Replies to your email will go here."
171
+ msgstr ""
172
+
173
+ #: includes/admin-new-form.php:35
174
+ msgid "Tip: for best results, use an email that exists on this domain."
175
+ msgstr ""
176
+
177
+ #: includes/admin-new-form.php:43 includes/admin-new-form.php:51
178
+ msgid "Optional (for now) - you can change this later"
179
+ msgstr ""
180
+
181
+ #: includes/admin-new-form.php:57
182
+ msgid "Create Form"
183
+ msgstr ""
184
+
185
+ #: includes/class-entries-detail.php:37 includes/class-entries-detail.php:91
186
+ msgid "Entry"
187
+ msgstr ""
188
+
189
+ #: includes/class-entries-detail.php:42
190
  msgid "Details"
191
  msgstr ""
192
 
193
+ #: includes/class-entries-detail.php:48
194
  msgid "Form Title"
195
  msgstr ""
196
 
197
+ #: includes/class-entries-detail.php:51 includes/class-entries-list.php:94
198
+ #: includes/class-export.php:18
 
199
  msgid "Date Submitted"
200
  msgstr ""
201
 
202
+ #: includes/class-entries-detail.php:54 includes/class-entries-list.php:93
203
+ #: includes/class-export.php:19
 
204
  msgid "IP Address"
205
  msgstr ""
206
 
207
+ #: includes/class-entries-detail.php:57 includes/class-entries-list.php:89
 
 
208
  msgid "Email Subject"
209
  msgstr ""
210
 
211
+ #: includes/class-entries-detail.php:60 includes/class-entries-list.php:90
212
+ #: includes/class-export.php:21
 
 
213
  msgid "Sender Name"
214
  msgstr ""
215
 
216
+ #: includes/class-entries-detail.php:63 includes/class-entries-list.php:91
217
+ #: includes/class-export.php:22
 
218
  msgid "Sender Email"
219
  msgstr ""
220
 
221
+ #: includes/class-entries-detail.php:66 includes/class-entries-list.php:92
222
+ #: includes/class-export.php:23
 
223
  msgid "Emailed To"
224
  msgstr ""
225
 
226
+ #: includes/class-entries-list.php:88 includes/class-export.php:95
227
+ msgid "Form"
228
  msgstr ""
229
 
230
+ #: includes/class-entries-list.php:176 visual-form-builder.php:1303
231
+ msgid "Delete"
232
  msgstr ""
233
 
234
+ #: includes/class-entries-list.php:218
235
+ msgid "View all forms"
 
236
  msgstr ""
237
 
238
+ #: includes/class-entries-list.php:225
239
+ msgid "Filter"
240
+ msgstr ""
241
+
242
+ #: includes/class-entries-list.php:252
243
+ msgid "Show all dates"
244
+ msgstr ""
245
+
246
+ #: includes/class-entries-list.php:264 includes/class-export.php:462
247
+ msgid "%1$s %2$d"
248
  msgstr ""
249
 
250
+ #: includes/class-entries-list.php:421
251
+ msgid "1 item"
252
+ msgid_plural "%s items"
253
+ msgstr[0] ""
254
+ msgstr[1] ""
255
+
256
+ #: includes/class-entries-list.php:442
257
+ msgid "Go to the first page"
258
  msgstr ""
259
 
260
+ #: includes/class-entries-list.php:450
261
+ msgid "Go to the previous page"
262
  msgstr ""
263
 
264
+ #: includes/class-entries-list.php:459
265
+ msgid "Current page"
266
+ msgstr ""
267
+
268
+ #: includes/class-entries-list.php:465
269
+ msgctxt "paging"
270
+ msgid "%1$s of %2$s"
271
+ msgstr ""
272
+
273
+ #: includes/class-entries-list.php:469
274
+ msgid "Go to the next page"
275
+ msgstr ""
276
+
277
+ #: includes/class-entries-list.php:477
278
+ msgid "Go to the last page"
279
+ msgstr ""
280
+
281
+ #: includes/class-export.php:17
282
  msgid "Entries ID"
283
  msgstr ""
284
 
285
+ #: includes/class-export.php:20
286
+ msgid "Subject"
287
  msgstr ""
288
 
289
+ #: includes/class-export.php:61 includes/class-export.php:351
290
+ msgid "No entries to pull field names from."
291
  msgstr ""
292
 
293
+ #: includes/class-export.php:72
294
+ msgid "Backup and save some or all of your Visual Form Builder data."
295
  msgstr ""
296
 
297
+ #: includes/class-export.php:73
298
+ msgid "Once you have saved the file, you will be able to import Visual Form Builder Pro data from this site into another site."
299
+ msgstr ""
300
+
301
+ #: includes/class-export.php:74
302
+ msgid "Choose what to export"
303
  msgstr ""
304
 
305
+ #: includes/class-export.php:76
306
+ msgid "All data"
 
307
  msgstr ""
308
 
309
+ #: includes/class-export.php:77
310
+ msgid "This will contain all of your forms, fields, entries, and email design settings."
 
311
  msgstr ""
312
 
313
+ #: includes/class-export.php:77 includes/class-export.php:80
314
+ msgid "Only available in Visual Form Builder Pro"
315
+ msgstr ""
316
+
317
+ #: includes/class-export.php:79
318
  msgid "Forms"
319
  msgstr ""
320
 
321
+ #: includes/class-export.php:80
322
+ msgid "This will contain all of your forms, fields, and email design settings"
323
+ msgstr ""
324
+
325
+ #: includes/class-export.php:82 visual-form-builder.php:1787
326
+ #: visual-form-builder.php:1811
327
  msgid "Entries"
328
  msgstr ""
329
 
330
+ #: includes/class-export.php:85
331
+ msgid "This will export entries in either a .csv, .txt, or .xls and cannot be used with the Import. If you need to import entries on another site, please use the All data option above."
332
  msgstr ""
333
 
334
+ #: includes/class-export.php:87
335
+ msgid "Format"
336
  msgstr ""
337
 
338
+ #: includes/class-export.php:89
339
+ msgid "Comma Separated (.csv)"
340
  msgstr ""
341
 
342
+ #: includes/class-export.php:90
343
+ msgid "Tab Delimited (.txt) - Pro only"
344
  msgstr ""
345
 
346
+ #: includes/class-export.php:91
347
+ msgid "Excel (.xls) - Pro only"
348
  msgstr ""
349
 
350
+ #: includes/class-export.php:105
351
+ msgid "Date Range"
352
  msgstr ""
353
 
354
+ #: includes/class-export.php:116
355
+ msgid "Fields"
356
  msgstr ""
357
 
358
+ #: includes/class-export.php:122
359
+ msgid "Select All"
360
  msgstr ""
361
 
362
+ #: includes/class-export.php:148
363
+ msgid "Download Export File"
364
  msgstr ""
365
 
366
+ #: includes/email.php:11
367
+ msgid "Security check: hidden spam field should be blank."
368
  msgstr ""
369
 
370
+ #: includes/email.php:13
371
+ msgid "Security check: failed secret question. Please try again!"
372
  msgstr ""
373
 
374
+ #: includes/email.php:21
375
+ msgid "Security check: looks like you are a SPAM bot. If you think this is an error, please email the site owner."
376
  msgstr ""
377
 
378
+ #: includes/email.php:110
379
+ msgid "File size exceeds %dMB. Most email providers will reject emails with attachments larger than %dMB. Please decrease the file size and try again."
380
  msgstr ""
381
 
382
+ #: includes/email.php:267
383
+ msgid "Your responses look too much like spam and could not be sent at this time."
384
  msgstr ""
385
 
386
+ #: includes/form-output.php:155
387
+ msgid "Logged in as <a href=\"%1$s\">%2$s</a>. Verification not required."
388
  msgstr ""
389
 
390
+ #: includes/form-output.php:326
391
+ msgid "Address"
392
  msgstr ""
393
 
394
+ #: includes/form-output.php:330
395
+ msgid "Address Line 2"
396
  msgstr ""
397
 
398
+ #: includes/form-output.php:334
399
+ msgid "City"
 
400
  msgstr ""
401
 
402
+ #: includes/form-output.php:338
403
+ msgid "State / Province / Region"
404
  msgstr ""
405
 
406
+ #: includes/form-output.php:342
407
+ msgid "Postal / Zip Code"
408
  msgstr ""
409
 
410
+ #: includes/form-output.php:346
411
+ msgid "Country"
 
412
  msgstr ""
413
 
414
+ #: includes/form-output.php:556
415
+ msgid "Verification"
416
  msgstr ""
417
 
418
+ #: includes/form-output.php:558
419
+ msgid "Please enter any two digits with <strong>no</strong> spaces (Example: 12)"
420
  msgstr ""
421
 
422
+ #: includes/form-output.php:571
423
+ msgid "This box is for spam protection - <strong>please leave it blank</strong>"
424
  msgstr ""
425
 
426
+ #: visual-form-builder.php:192
427
+ msgid "Settings"
428
  msgstr ""
429
 
430
+ #: visual-form-builder.php:256
431
+ msgid "Recent Visual Form Builder Entries"
432
  msgstr ""
433
 
434
+ #: visual-form-builder.php:279
435
+ msgid "You currently do not have any forms."
436
  msgstr ""
437
 
438
+ #: visual-form-builder.php:281
439
+ msgid "Get started!"
440
  msgstr ""
441
 
442
+ #: visual-form-builder.php:331
443
+ msgid "Number of entries to show:"
444
  msgstr ""
445
 
446
+ #: visual-form-builder.php:434
447
+ msgid "Entries per page"
448
  msgstr ""
449
 
450
+ #: visual-form-builder.php:473
451
+ msgid "Form Items"
452
  msgstr ""
453
 
454
+ #: visual-form-builder.php:474
455
+ msgid "Display Forms"
 
456
  msgstr ""
457
 
458
+ #: visual-form-builder.php:485
459
+ msgid "Click"
 
460
  msgstr ""
461
 
462
+ #: visual-form-builder.php:485
463
+ msgid "to Add a Field"
464
+ msgstr ""
465
+
466
+ #: visual-form-builder.php:487
467
+ msgid "Standard"
468
+ msgstr ""
469
+
470
+ #: visual-form-builder.php:528
471
+ msgid "Add forms to your Posts or Pages by locating the icon shown below in the area above your post/page editor."
472
+ msgstr ""
473
+
474
+ #: visual-form-builder.php:531
475
+ msgid "You may also manually insert the shortcode into a post/page."
476
+ msgstr ""
477
+
478
+ #: visual-form-builder.php:532
479
+ msgid "Shortcode"
480
+ msgstr ""
481
+
482
+ #: visual-form-builder.php:1301
483
+ msgid "Edit Form"
484
+ msgstr ""
485
+
486
+ #: visual-form-builder.php:1326
487
+ msgid "New Features of Visual Form Builder Pro"
488
+ msgstr ""
489
+
490
+ #: visual-form-builder.php:1328
491
+ msgid "Now with Add-Ons"
492
+ msgstr ""
493
+
494
+ #: visual-form-builder.php:1329
495
+ msgid "Akismet Support"
496
+ msgstr ""
497
+
498
+ #: visual-form-builder.php:1330
499
+ msgid "Optional SPAM Verification"
500
+ msgstr ""
501
+
502
+ #: visual-form-builder.php:1331
503
+ msgid "Nested Drag and Drop"
504
+ msgstr ""
505
+
506
+ #: visual-form-builder.php:1332
507
+ msgid "Conditional Logic"
508
+ msgstr ""
509
+
510
+ #: visual-form-builder.php:1333
511
+ msgid "10+ new Form Fields"
512
+ msgstr ""
513
+
514
+ #: visual-form-builder.php:1334
515
+ msgid "Complete Entries Management"
516
+ msgstr ""
517
+
518
+ #: visual-form-builder.php:1335
519
+ msgid "Import/Export"
520
+ msgstr ""
521
+
522
+ #: visual-form-builder.php:1336
523
+ msgid "Quality HTML Email Template"
524
+ msgstr ""
525
+
526
+ #: visual-form-builder.php:1337
527
+ msgid "Plain Text Email Option"
528
+ msgstr ""
529
+
530
+ #: visual-form-builder.php:1338
531
+ msgid "Email Designer"
532
+ msgstr ""
533
+
534
+ #: visual-form-builder.php:1339
535
+ msgid "Analytics"
536
+ msgstr ""
537
+
538
+ #: visual-form-builder.php:1340
539
+ msgid "Data &amp; Form Migration"
540
+ msgstr ""
541
+
542
+ #: visual-form-builder.php:1341
543
+ msgid "Scheduling"
544
+ msgstr ""
545
+
546
+ #: visual-form-builder.php:1342
547
+ msgid "Limit Form Entries"
548
+ msgstr ""
549
+
550
+ #: visual-form-builder.php:1343
551
+ msgid "Simple PayPal Integration"
552
+ msgstr ""
553
+
554
+ #: visual-form-builder.php:1344
555
+ msgid "Form Paging"
556
+ msgstr ""
557
+
558
+ #: visual-form-builder.php:1345
559
+ msgid "Live Preview"
560
+ msgstr ""
561
+
562
+ #: visual-form-builder.php:1346
563
+ msgid "Custom Capabilities"
564
+ msgstr ""
565
+
566
+ #: visual-form-builder.php:1347
567
+ msgid "No License Key"
568
+ msgstr ""
569
+
570
+ #: visual-form-builder.php:1348
571
+ msgid "Automatic Updates"
572
  msgstr ""
573
 
574
+ #: visual-form-builder.php:1351
575
+ msgid "Learn more about some of these features"
576
  msgstr ""
577
 
578
+ #: visual-form-builder.php:1352
579
+ msgid "Buy Now"
580
  msgstr ""
581
 
582
+ #: visual-form-builder.php:1352
583
+ msgid "Only $10"
584
  msgstr ""
585
 
586
+ #: visual-form-builder.php:1355
587
+ msgid "Help Promote Visual Form Builder"
588
  msgstr ""
589
 
590
+ #: visual-form-builder.php:1357
591
+ msgid "Follow me on Twitter"
592
  msgstr ""
593
 
594
+ #: visual-form-builder.php:1358
595
+ msgid "Rate Visual Form Builder on WordPress.org"
596
+ msgstr ""
597
+
598
+ #: visual-form-builder.php:1419
599
  msgid "Edit Field Item"
600
  msgstr ""
601
 
602
+ #: visual-form-builder.php:1436 visual-form-builder.php:1477
603
+ #: visual-form-builder.php:1716
604
+ msgid "CSS Classes"
605
+ msgstr ""
606
+
607
+ #: visual-form-builder.php:1447 visual-form-builder.php:1467
608
  msgid "Name"
609
  msgstr ""
610
 
611
+ #: visual-form-builder.php:1455
612
+ msgid "Description (HTML tags allowed)"
613
+ msgstr ""
614
+
615
+ #: visual-form-builder.php:1487
616
  msgid "Description"
617
  msgstr ""
618
 
619
+ #: visual-form-builder.php:1499
620
+ msgid "Options"
621
  msgstr ""
622
 
623
+ #: visual-form-builder.php:1556
624
+ msgid "Accepted File Extensions"
625
+ msgstr ""
626
+
627
+ #: visual-form-builder.php:1571
628
+ msgid "Validation"
629
+ msgstr ""
630
+
631
+ #: visual-form-builder.php:1578
632
  msgid "12 Hour Format"
633
  msgstr ""
634
 
635
+ #: visual-form-builder.php:1579
636
  msgid "24 Hour Format"
637
  msgstr ""
638
 
639
+ #: visual-form-builder.php:1581
640
  msgid "None"
641
  msgstr ""
642
 
643
+ #: visual-form-builder.php:1582
644
  msgid "Email"
645
  msgstr ""
646
 
647
+ #: visual-form-builder.php:1583
648
  msgid "URL"
649
  msgstr ""
650
 
651
+ #: visual-form-builder.php:1584
652
  msgid "Date"
653
  msgstr ""
654
 
655
+ #: visual-form-builder.php:1585
656
  msgid "Number"
657
  msgstr ""
658
 
659
+ #: visual-form-builder.php:1586
660
  msgid "Digits"
661
  msgstr ""
662
 
663
+ #: visual-form-builder.php:1587
664
  msgid "Phone"
665
  msgstr ""
666
 
667
+ #: visual-form-builder.php:1619
668
  msgid "Required"
669
  msgstr ""
670
 
671
+ #: visual-form-builder.php:1623
672
  msgid "No"
673
  msgstr ""
674
 
675
+ #: visual-form-builder.php:1624
676
  msgid "Yes"
677
  msgstr ""
678
 
679
+ #: visual-form-builder.php:1633
680
  msgid "Size"
681
  msgstr ""
682
 
683
+ #: visual-form-builder.php:1637
684
+ msgid "Small"
685
+ msgstr ""
686
+
687
+ #: visual-form-builder.php:1638
688
  msgid "Medium"
689
  msgstr ""
690
 
691
+ #: visual-form-builder.php:1639
692
  msgid "Large"
693
  msgstr ""
694
 
695
+ #: visual-form-builder.php:1648
696
+ msgid "Options Layout"
697
+ msgstr ""
698
+
699
+ #: visual-form-builder.php:1652
700
+ msgid "One Column"
701
+ msgstr ""
702
+
703
+ #: visual-form-builder.php:1653
704
+ msgid "Two Columns"
705
+ msgstr ""
706
+
707
+ #: visual-form-builder.php:1654
708
+ msgid "Three Columns"
709
+ msgstr ""
710
+
711
+ #: visual-form-builder.php:1655
712
+ msgid "Auto Width"
713
+ msgstr ""
714
+
715
+ #: visual-form-builder.php:1664
716
+ msgid "Field Layout"
717
+ msgstr ""
718
+
719
+ #: visual-form-builder.php:1669
720
+ msgid "Default"
721
+ msgstr ""
722
+
723
+ #: visual-form-builder.php:1671
724
+ msgid "Left Half"
725
+ msgstr ""
726
+
727
+ #: visual-form-builder.php:1672
728
+ msgid "Right Half"
729
+ msgstr ""
730
+
731
+ #: visual-form-builder.php:1675
732
+ msgid "Left Third"
733
+ msgstr ""
734
+
735
+ #: visual-form-builder.php:1676
736
+ msgid "Middle Third"
737
+ msgstr ""
738
+
739
+ #: visual-form-builder.php:1677
740
+ msgid "Right Third"
741
+ msgstr ""
742
+
743
+ #: visual-form-builder.php:1680
744
+ msgid "Left Two Thirds"
745
+ msgstr ""
746
+
747
+ #: visual-form-builder.php:1681
748
+ msgid "Right Two Thirds"
749
+ msgstr ""
750
+
751
+ #: visual-form-builder.php:1690
752
+ msgid "Default Value"
753
+ msgstr ""
754
+
755
+ #: visual-form-builder.php:1700
756
+ msgid "Default Country"
757
+ msgstr ""
758
+
759
+ #: visual-form-builder.php:1728
760
  msgid "Remove"
761
  msgstr ""
762
 
763
+ #: visual-form-builder.php:1759
764
+ msgid "The form has been successfully created."
765
+ msgstr ""
766
+
767
+ #: visual-form-builder.php:1762
768
+ msgid "The %s form has been updated."
769
  msgstr ""
770
 
771
+ #: visual-form-builder.php:1765
772
+ msgid "The form has been successfully deleted."
773
  msgstr ""
774
 
775
+ #: visual-form-builder.php:1768
776
+ msgid "The form has been successfully duplicated."
777
  msgstr ""
778
 
779
+ #: visual-form-builder.php:1783 visual-form-builder.php:1785
780
+ #: visual-form-builder.php:1809
781
+ msgid "Visual Form Builder"
782
  msgstr ""
783
 
784
+ #: visual-form-builder.php:1785
785
+ msgid "All Forms"
786
  msgstr ""
787
 
788
+ #: visual-form-builder.php:1786 visual-form-builder.php:1810
789
+ msgid "Add New Form"
790
  msgstr ""
791
 
792
+ #: visual-form-builder.php:1788 visual-form-builder.php:1812
793
+ msgid "Export"
794
  msgstr ""
795
 
796
+ #: visual-form-builder.php:1823
797
+ msgid "Search results for \"%s\""
798
  msgstr ""
799
 
800
+ #: visual-form-builder.php:1856
801
+ msgid "New Form"
802
  msgstr ""
803
 
804
+ #: visual-form-builder.php:1945
805
+ msgid "This field is required and cannot be empty."
806
+ msgstr ""
807
+
808
+ #: visual-form-builder.php:1952
809
+ msgid "Not a valid email address"
810
+ msgstr ""
811
+
812
+ #: visual-form-builder.php:1958
813
+ msgid "Not a valid number"
814
+ msgstr ""
815
+
816
+ #: visual-form-builder.php:1965
817
+ msgid "Not a valid phone number. Most US/Canada and International formats accepted."
818
+ msgstr ""
819
+
820
+ #: visual-form-builder.php:1970
821
+ msgid "Not a valid URL."
822
+ msgstr ""
823
+ #. Plugin Name of the plugin/theme
824
+ msgid "Visual Form Builder"
825
+ msgstr ""
826
+
827
+ #. Description of the plugin/theme
828
+ msgid "Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking."
829
+ msgstr ""
830
+
831
+ #. Author of the plugin/theme
832
+ msgid "Matthew Muro"
833
+ msgstr ""
834
+
835
+ #. Author URI of the plugin/theme
836
+ msgid "http://matthewmuro.com"
837
+ msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=G87A9
4
  Tags: form, forms, contact form, form to email, email form, email, input, validation, jquery, shortcode
5
  Requires at least: 3.4.1
6
  Tested up to: 3.5.1
7
- Stable tag: 2.6.9
8
  License: GPLv2 or later
9
 
10
  Build beautiful, fully functional forms in only a few minutes without writing PHP, CSS, or HTML.
@@ -84,9 +84,7 @@ If you are a fan of Visual Form Builder and want extra features and functionalit
84
  = SPAM Protection =
85
 
86
  * Automatically included on every form
87
- * Uses a simple, yet effective, logic-based verification system
88
- * [WordPress Nonce](http://codex.wordpress.org/WordPress_Nonces)
89
-
90
 
91
  == Installation ==
92
 
@@ -106,21 +104,43 @@ If you are a fan of Visual Form Builder and want extra features and functionalit
106
  1. Drag and drop the elements to put them in order.
107
  1. Click Save Form to save your changes.
108
 
109
- = What's the deal with the fieldsets? =
110
 
111
- Fieldsets, a way to group form fields, are an essential piece of this plugin's HTML. As such, at least one fieldset is required and must be first in the order. Subsequent fieldsets may be placed wherever you would like to start your next grouping of fields.
112
 
113
- = Can I use my own verification system such as a CAPTCHA? =
 
 
 
 
 
 
114
 
115
- Because of the accessibility and usability problems inherent with a CAPTCHA system, Visual Form Builder will not be using such a system. Other methods of SPAM prevention will be explored to further enhance protection of your forms.
116
 
117
- = I'm not getting any emails! What's wrong? =
118
 
119
- Some people have reported that after the form is submitted, no email is received. If this is the case for you, it typically means that your server or web host has not properly configured their SMTP settings.
120
 
121
  Try using a plugin such as [WP Mail SMTP](http://wordpress.org/extend/plugins/wp-mail-smtp/) to correct the issue.
122
 
123
- = Something in my theme isn't working anymore. What's wrong? =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
125
  Visual Form Builder is built using preferred WordPress coding standards. In many cases, some theme authors or plugin developers do not follow these standards and it causes conflicts with those that do follow the standards. The two most common issues have to do with either jQuery or CSS.
126
 
@@ -130,7 +150,7 @@ Visual Form Builder requires at least jQuery version 1.7. Please make sure your
130
 
131
  **CSS conflicts**
132
 
133
- If your forms do not look as expected, chances are there's some CSS in your theme conflicting with the built-in CSS of Visual Form Builder. Please follow the instructions on how to customize the CSS.
134
 
135
  **Theme conflicts**
136
 
@@ -153,26 +173,20 @@ If everything works with only Visual Form Builder activated, you have a plugin c
153
 
154
  If, after following the above procedures, you are still having problems please report this issue on the [Support Forum](http://wordpress.org/support/plugin/visual-form-builder).
155
 
156
- = How do I customize the CSS? =
157
-
158
- If you want to customize the appearance of the forms using your own CSS, here's how to do it:
159
 
160
- 1. Add this code to your theme's `functions.php` file: `add_filter( 'visual-form-builder-css', '__return_false' );`
161
- 1. Copy everything from `css/visual-form-builder.css` into your theme's `style.css`
162
- 1. Change the CSS properties in your theme's `style.css` as needed
163
 
164
- If you want to customize the jQuery date picker CSS, follow these steps:
165
 
166
- 1. Add this code to your theme's `functions.php` file: `add_filter( 'vfb-date-picker-css', '__return_false' );`
167
- 1. Refer to the [jQuery UI Date Picker documentation on theming](http://jqueryui.com/demos/datepicker/#theming)
168
 
169
- = How do I change the Date Picker configuration? =
170
 
171
- The jQuery UI Date Picker is a complex and highly configurable plugin. By default, Visual Form Builder's date field will use the default options and configuration.
 
172
 
173
- To use the more complex features of the Date Picker plugin, [follow this tutorial](http://matthewmuro.com/2012/02/23/how-to-customize-the-date-picker/).
174
-
175
- = How do I translate the field validation text to my language? =
176
 
177
  The validation messages (ex: 'This field is required' or 'Please enter a valid email address') are generated by the jQuery Form Validation plugin.
178
 
@@ -182,28 +196,25 @@ Follow these instructions:
182
 
183
  In your theme folder, create a JavaScript file. In this example, I'm using `myjs.js`. Add the following code to it and customize the language to what you need:
184
 
185
- `jQuery(document).ready(function($) { $.extend($.validator.messages, { required: "Eingabe nötig", email: "Bitte eine gültige E-Mail-Adresse eingeben" }); });`
 
 
 
 
 
186
 
187
  Now, in your functions.php file, add the following piece of code:
188
 
189
- `wp_enqueue_script( 'my-visual-form-builder-validation', get_bloginfo( 'template_url' ) . '/myjs.js' , array( 'jquery', 'jquery-form-validation' ), '', true );`
190
-
191
- = How do I export my entries to a CSV? =
192
-
193
- There are two ways to export your entries to a CSV: Export All or Export Selected.
194
-
195
- To Export All:
196
-
197
- 1. Go to the Export screen
198
- 1. Select the form you would like to export and a date range, if needed
199
- 1. Click Download Export File and save the file
200
-
201
- To Export Selected:
202
-
203
- 1. Go to the Entries screen
204
- 1. Check boxes next to the entries you wish to export
205
- 1. Select the `Export Selected` option under the `Bulk Actions` dropdown
206
- 1. Click Apply and save the file
207
 
208
  == Screenshots ==
209
 
@@ -214,6 +225,21 @@ To Export Selected:
214
 
215
  == Changelog ==
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  **Version 2.6.9**
218
 
219
  * Fix bug where Validation would be removed on saving predefined fields
@@ -473,6 +499,9 @@ To Export Selected:
473
 
474
  == Upgrade Notice ==
475
 
 
 
 
476
  = 2.6.9 =
477
  Fix bug where Validation would be removed on saving predefined fields
478
 
4
  Tags: form, forms, contact form, form to email, email form, email, input, validation, jquery, shortcode
5
  Requires at least: 3.4.1
6
  Tested up to: 3.5.1
7
+ Stable tag: 2.7
8
  License: GPLv2 or later
9
 
10
  Build beautiful, fully functional forms in only a few minutes without writing PHP, CSS, or HTML.
84
  = SPAM Protection =
85
 
86
  * Automatically included on every form
87
+ * Uses a simple and accessible, yet effective, [text CAPTCHA](http://textcaptcha.com/) verification system
 
 
88
 
89
  == Installation ==
90
 
104
  1. Drag and drop the elements to put them in order.
105
  1. Click Save Form to save your changes.
106
 
107
+ = Can I use my own verification system such as a CAPTCHA? =
108
 
109
+ Because of the accessibility and usability problems inherent with a CAPTCHA system, Visual Form Builder will not be using such a system.
110
 
111
+ Visual Form Builder uses a [text CAPTCHA](http://textcaptcha.com/). If you decide to upgrade to Visual Form Builder Pro, you will gain [Akismet](https://akismet.com/) support.
112
+
113
+ = Emails are not being sent =
114
+
115
+ *Note*: Form submissions will always be saved in the database whether or not the email was sent.
116
+
117
+ **Check SPAM folder**
118
 
119
+ A quick look in the SPAM folder will tell you if the emails are being routed into the folder. If so, simply train your email client to not treat those emails as SPAM
120
 
121
+ **Configure your site to use SMTP**
122
 
123
+ Some people have reported that after the form is submitted, no email is received. If this is the case for you, it typically means that your server or web host has not properly configured their SMTP settings.
124
 
125
  Try using a plugin such as [WP Mail SMTP](http://wordpress.org/extend/plugins/wp-mail-smtp/) to correct the issue.
126
 
127
+ **Set the Reply-To email to a same domain email**
128
+
129
+ Setting up SMTP will get you part of the way there. For most, it solves the problem. For others, it requires additional configuration
130
+
131
+ If you find that emails are not being sent, you should first confirm that you have completed all of the details in the `Form Settings > Email section`. Next, be sure to set the Reply-To option to an email that exists on the same domain as your WordPress site.
132
+
133
+ **Possible mod_security conflict**
134
+
135
+ Some servers are overzealous in their restrictions on the $_POST object and will block anything with certain keywords. Check your server logs and look for any 403 Forbidden or 500 Internal Server errors. If you notice these errors when submitting a form, contact your host and find out if there are any restrictions.
136
+
137
+ **Enable local mail for your domain**
138
+
139
+ Be sure to enable local mail delivery for your domain. Disabling local mail delivery is common if you are using an external mail server, but can cause bounce-backs saying the email user does not exist.
140
+
141
+ Also, if possible, check your server’s email logs or have your host check them for you and see if it’s refusing to send an email. It’s possible your email server is attempting to send the emails but can’t for missing mail resources, security, SPAM filtering, or other technical problems.
142
+
143
+ = Resolving Theme or Plugin Conflicts =
144
 
145
  Visual Form Builder is built using preferred WordPress coding standards. In many cases, some theme authors or plugin developers do not follow these standards and it causes conflicts with those that do follow the standards. The two most common issues have to do with either jQuery or CSS.
146
 
150
 
151
  **CSS conflicts**
152
 
153
+ If your forms do not look as expected, chances are there's some CSS in your theme conflicting with the built-in CSS of Visual Form Builder. Please follow the tutorial on [how to customize the CSS](http://matthewmuro.com/2012/11/15/visual-form-builder-pro-customizing-the-form-design/).
154
 
155
  **Theme conflicts**
156
 
173
 
174
  If, after following the above procedures, you are still having problems please report this issue on the [Support Forum](http://wordpress.org/support/plugin/visual-form-builder).
175
 
176
+ = Customizing the form design =
 
 
177
 
178
+ Please follow the tutorial on [how to customize the CSS](http://matthewmuro.com/2012/11/15/visual-form-builder-pro-customizing-the-form-design/).
 
 
179
 
180
+ = Customizing the Date Picker =
181
 
182
+ The jQuery UI Date Picker is a complex and highly configurable plugin. By default, Visual Form Builder's date field will use the default options and configuration.
 
183
 
184
+ To use the more complex features of the Date Picker plugin, please read these tutorials from the blog:
185
 
186
+ 1. [How to customize the Date Picker](http://matthewmuro.com/2012/02/23/how-to-customize-the-date-picker/)
187
+ 1. [Even more Date Picker customizations](http://matthewmuro.com/2012/08/20/even-more-date-picker-customizations/).
188
 
189
+ = How do I translate the error messages to my language? =
 
 
190
 
191
  The validation messages (ex: 'This field is required' or 'Please enter a valid email address') are generated by the jQuery Form Validation plugin.
192
 
196
 
197
  In your theme folder, create a JavaScript file. In this example, I'm using `myjs.js`. Add the following code to it and customize the language to what you need:
198
 
199
+ `jQuery(document).ready(function($) {
200
+ $.extend($.validator.messages, {
201
+ required: "Eingabe nötig",
202
+ email: "Bitte eine gültige E-Mail-Adresse eingeben"
203
+ });
204
+ });`
205
 
206
  Now, in your functions.php file, add the following piece of code:
207
 
208
+ `add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
209
+ function my_scripts_method() {
210
+ wp_register_script( 'my-vfb-validation',
211
+ get_template_directory_uri() . '/js/my-js.js',
212
+ array( 'jquery', 'jquery-form-validation' ),
213
+ '1.0',
214
+ false );
215
+
216
+ wp_enqueue_script( 'my-vfb-validation' );
217
+ }`
 
 
 
 
 
 
 
 
218
 
219
  == Screenshots ==
220
 
225
 
226
  == Changelog ==
227
 
228
+ **Version 2.7**
229
+
230
+ * Add widget for displaying forms in sidebar
231
+ * Add dashboard widget for displaying recent entries
232
+ * Add DONOTCACHEPAGE constant to fix occasional nonce errors for caching plugin users
233
+ * Fix bug where second address line was always required
234
+ * Fix bug for misnamed Instructions CSS class
235
+ * Fix bug where quotes were not converted on output
236
+ * Fix bug where left/right aligned labels and content were not displaying correctly
237
+ * Fix bug where export AJAX was not returning properly
238
+ * Fix bug for Export Select All fields
239
+ * Sanitize IP address before inserting into database
240
+ * Rollback Date field type to non-HTML5 to prevent duplicate date pickers in Chrome
241
+ * Update language .POT
242
+
243
  **Version 2.6.9**
244
 
245
  * Fix bug where Validation would be removed on saving predefined fields
499
 
500
  == Upgrade Notice ==
501
 
502
+ = 2.7 =
503
+ Add sidebar and dashboard widgets. Fix Export bugs.
504
+
505
  = 2.6.9 =
506
  Fix bug where Validation would be removed on saving predefined fields
507
 
uninstall.php CHANGED
@@ -14,6 +14,7 @@
14
 
15
  delete_option( 'vfb_db_version' );
16
  delete_option( 'visual-form-builder-screen-options' );
 
17
 
18
  $wpdb->query( "DELETE FROM " . $wpdb->prefix . "usermeta WHERE meta_key IN ( 'vfb-form-settings', 'vfb_entries_per_page', 'managevisual-form-builder_page_vfb-entriescolumnshidden' )" );
19
  ?>
14
 
15
  delete_option( 'vfb_db_version' );
16
  delete_option( 'visual-form-builder-screen-options' );
17
+ delete_option( 'vfb_dashboard_widget_options' );
18
 
19
  $wpdb->query( "DELETE FROM " . $wpdb->prefix . "usermeta WHERE meta_key IN ( 'vfb-form-settings', 'vfb_entries_per_page', 'managevisual-form-builder_page_vfb-entriescolumnshidden' )" );
20
  ?>
visual-form-builder.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Visual Form Builder
4
  Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
5
  Author: Matthew Muro
6
  Author URI: http://matthewmuro.com
7
- Version: 2.6.9
8
  */
9
 
10
  /*
@@ -82,11 +82,12 @@ class Visual_Form_Builder{
82
  // Build options and settings pages.
83
  add_action( 'admin_menu', array( &$this, 'add_admin' ) );
84
  add_action( 'admin_init', array( &$this, 'save' ) );
 
85
 
86
- add_action( 'wp_ajax_visual_form_builder_process_sort', array( &$this, 'process_sort_callback' ) );
87
- add_action( 'wp_ajax_visual_form_builder_create_field', array( &$this, 'create_field_callback' ) );
88
- add_action( 'wp_ajax_visual_form_builder_delete_field', array( &$this, 'delete_field_callback' ) );
89
- add_action( 'wp_ajax_visual_form_builder_form_settings', array( &$this, 'form_settings_callback' ) );
90
  add_action( 'wp_ajax_visual_form_builder_media_button', array( &$this, 'display_media_button' ) );
91
 
92
 
@@ -95,6 +96,9 @@ class Visual_Form_Builder{
95
  // Adds additional media button to insert form shortcode
96
  add_action( 'media_buttons', array( &$this, 'add_media_button' ), 999 );
97
 
 
 
 
98
  // Load the includes files
99
  add_action( 'load-visual-form-builder_page_vfb-entries', array( &$this, 'includes' ) );
100
 
@@ -133,6 +137,23 @@ class Visual_Form_Builder{
133
  // Add CSS to the front-end
134
  add_action( 'wp_enqueue_scripts', array( &$this, 'css' ) );
135
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
  /**
138
  * Load localization file
@@ -225,6 +246,92 @@ class Visual_Form_Builder{
225
  <?php
226
  die(1);
227
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
 
229
  /**
230
  * Register contextual help. This is for the Help tab dropdown
@@ -421,6 +528,8 @@ class Visual_Form_Builder{
421
  <p><?php _e( 'Add forms to your Posts or Pages by locating the icon shown below in the area above your post/page editor.', 'visual-form-builder' ); ?><br>
422
  <img src="<?php echo plugins_url( 'visual-form-builder/images/media-button-help.png' ); ?>">
423
  </p>
 
 
424
  <?php
425
  }
426
 
@@ -531,7 +640,7 @@ class Visual_Form_Builder{
531
  wp_enqueue_script( 'jquery-ui-sortable' );
532
  wp_enqueue_script( 'postbox' );
533
  wp_enqueue_script( 'jquery-form-validation', plugins_url( '/js/jquery.validate.min.js', __FILE__ ), array( 'jquery' ), '1.9.0', true );
534
- wp_enqueue_script( 'form-elements-add', plugins_url( "visual-form-builder/js/visual-form-builder$this->load_dev_files.js" ) , array( 'jquery', 'jquery-form-validation' ), '', true );
535
  wp_enqueue_script( 'nested-sortable', plugins_url( 'visual-form-builder/js/jquery.ui.nestedSortable.js' ) , array( 'jquery', 'jquery-ui-sortable' ), '', true );
536
 
537
  wp_enqueue_style( 'visual-form-builder-style', plugins_url( "visual-form-builder/css/visual-form-builder-admin.css" ) );
@@ -548,7 +657,7 @@ class Visual_Form_Builder{
548
 
549
  wp_enqueue_script( 'jquery-form-validation', plugins_url( '/js/jquery.validate.min.js', __FILE__ ), array( 'jquery' ), '1.9.0', true );
550
  wp_enqueue_script( 'jquery-ui-datepicker' );
551
- wp_enqueue_script( 'visual-form-builder-validation', plugins_url( "visual-form-builder/js/visual-form-builder-validate.js" ) , array( 'jquery', 'jquery-form-validation' ), '', true );
552
  wp_enqueue_script( 'visual-form-builder-metadata', plugins_url( 'visual-form-builder/js/jquery.metadata.js' ) , array( 'jquery', 'jquery-form-validation' ), '', true );
553
  }
554
 
@@ -953,7 +1062,7 @@ class Visual_Form_Builder{
953
  *
954
  * @since 1.0
955
  */
956
- public function process_sort_callback() {
957
  global $wpdb;
958
 
959
  $data = array();
@@ -971,6 +1080,8 @@ class Visual_Form_Builder{
971
  // Update each field with it's new sequence and parent ID
972
  $wpdb->update( $this->field_table_name, array( 'field_sequence' => $k, 'field_parent' => $v['parent'] ), array( 'field_id' => $v['field_id'] ) );
973
  }
 
 
974
 
975
  die(1);
976
  }
@@ -980,7 +1091,7 @@ class Visual_Form_Builder{
980
  *
981
  * @since 1.9
982
  */
983
- public function create_field_callback() {
984
  global $wpdb;
985
 
986
  $data = array();
@@ -1074,7 +1185,7 @@ class Visual_Form_Builder{
1074
  *
1075
  * @since 1.9
1076
  */
1077
- public function delete_field_callback() {
1078
  global $wpdb;
1079
 
1080
  if ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'toplevel_page_visual-form-builder' && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_delete_field' ) {
@@ -1104,7 +1215,7 @@ class Visual_Form_Builder{
1104
  *
1105
  * @since 2.2
1106
  */
1107
- public function form_settings_callback() {
1108
  global $current_user;
1109
  get_currentuserinfo();
1110
 
@@ -1777,7 +1888,7 @@ class Visual_Form_Builder{
1777
 
1778
  $form_id = ( isset( $_REQUEST['form_id'] ) ) ? (int) esc_html( $_REQUEST['form_id'] ) : '';
1779
 
1780
- if ( isset( $_REQUEST['visual-form-builder-submit'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'visual-form-builder-nonce' ) ) {
1781
  // Get forms
1782
  $order = sanitize_sql_orderby( 'form_id DESC' );
1783
  $forms = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order", $form_id ) );
@@ -1933,6 +2044,9 @@ class Visual_Form_Builder{
1933
  // On plugin activation, install the databases and add/update the DB version
1934
  register_activation_hook( __FILE__, array( 'Visual_Form_Builder', 'install_db' ) );
1935
 
 
 
 
1936
  // Special case to load Export class so AJAX is registered
1937
  require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-export.php' );
1938
  if ( !isset( $export ) )
4
  Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
5
  Author: Matthew Muro
6
  Author URI: http://matthewmuro.com
7
+ Version: 2.7
8
  */
9
 
10
  /*
82
  // Build options and settings pages.
83
  add_action( 'admin_menu', array( &$this, 'add_admin' ) );
84
  add_action( 'admin_init', array( &$this, 'save' ) );
85
+ add_action( 'admin_init', array( &$this, 'additional_plugin_setup' ) );
86
 
87
+ add_action( 'wp_ajax_visual_form_builder_process_sort', array( &$this, 'ajax_sort_field' ) );
88
+ add_action( 'wp_ajax_visual_form_builder_create_field', array( &$this, 'ajax_create_field' ) );
89
+ add_action( 'wp_ajax_visual_form_builder_delete_field', array( &$this, 'ajax_delete_field' ) );
90
+ add_action( 'wp_ajax_visual_form_builder_form_settings', array( &$this, 'ajax_form_settings' ) );
91
  add_action( 'wp_ajax_visual_form_builder_media_button', array( &$this, 'display_media_button' ) );
92
 
93
 
96
  // Adds additional media button to insert form shortcode
97
  add_action( 'media_buttons', array( &$this, 'add_media_button' ), 999 );
98
 
99
+ // Adds a Dashboard widget
100
+ add_action( 'wp_dashboard_setup', array( &$this, 'add_dashboard_widget' ) );
101
+
102
  // Load the includes files
103
  add_action( 'load-visual-form-builder_page_vfb-entries', array( &$this, 'includes' ) );
104
 
137
  // Add CSS to the front-end
138
  add_action( 'wp_enqueue_scripts', array( &$this, 'css' ) );
139
  }
140
+
141
+ /**
142
+ * Allow for additional plugin code to be run during admin_init
143
+ * which is not available during the plugin __construct()
144
+ *
145
+ * @since 2.7
146
+ */
147
+ public function additional_plugin_setup() {
148
+
149
+ if ( !get_option( 'vfb_dashboard_widget_options' ) ) {
150
+ $widget_options['vfb_dashboard_recent_entries'] = array(
151
+ 'items' => 5,
152
+ );
153
+ update_option( 'vfb_dashboard_widget_options', $widget_options );
154
+ }
155
+
156
+ }
157
 
158
  /**
159
  * Load localization file
246
  <?php
247
  die(1);
248
  }
249
+
250
+ /**
251
+ * Adds the dashboard widget
252
+ *
253
+ * @since 2.7
254
+ */
255
+ public function add_dashboard_widget() {
256
+ wp_add_dashboard_widget( 'vfb-dashboard', __( 'Recent Visual Form Builder Entries', 'visual-form-builder' ), array( &$this, 'dashboard_widget' ), array( &$this, 'dashboard_widget_control' ) );
257
+ }
258
+
259
+ /**
260
+ * Displays the dashboard widget content
261
+ *
262
+ * @since 2.7
263
+ */
264
+ public function dashboard_widget() {
265
+ global $wpdb;
266
+
267
+ // Get the date/time format that is saved in the options table
268
+ $date_format = get_option( 'date_format' );
269
+ $time_format = get_option( 'time_format' );
270
+
271
+ $widgets = get_option( 'vfb_dashboard_widget_options' );
272
+ $total_items = isset( $widgets['vfb_dashboard_recent_entries'] ) && isset( $widgets['vfb_dashboard_recent_entries']['items'] ) ? absint( $widgets['vfb_dashboard_recent_entries']['items'] ) : 5;
273
+
274
+ $entries = $wpdb->get_results( $wpdb->prepare( "SELECT forms.form_title, entries.entries_id, entries.form_id, entries.sender_name, entries.sender_email, entries.date_submitted FROM $this->form_table_name AS forms INNER JOIN $this->entries_table_name AS entries ON entries.form_id = forms.form_id ORDER BY entries.date_submitted DESC LIMIT %d", $total_items ) );
275
+
276
+ if ( !$entries ) :
277
+ echo sprintf(
278
+ '<p>%1$s <a href="%2$s">%3$s</a>',
279
+ __( 'You currently do not have any forms.', 'visual-form-builder' ),
280
+ esc_url( admin_url( 'admin.php?page=vfb-add-new' ) ),
281
+ __( 'Get started!', 'visual-form-builder' )
282
+ );
283
+ else :
284
+
285
+ $content = '';
286
+
287
+ foreach ( $entries as $entry ) :
288
+
289
+ $content .= sprintf(
290
+ '<li><a href="%1$s">%4$s</a> via <a href="%2$s">%5$s</a> <span class="rss-date">%6$s</span><cite>%3$s</cite></li>',
291
+ esc_url( add_query_arg( array( 'action' => 'view', 'entry' => absint( $entry->entries_id ) ), admin_url( 'admin.php?page=vfb-entries' ) ) ),
292
+ esc_url( add_query_arg( 'form-filter', absint( $entry->form_id ), admin_url( 'admin.php?page=vfb-entries' ) ) ),
293
+ esc_html( $entry->sender_name ),
294
+ esc_html( $entry->sender_email ),
295
+ esc_html( $entry->form_title ),
296
+ date( "$date_format $time_format", strtotime( $entry->date_submitted ) )
297
+ );
298
+
299
+ endforeach;
300
+
301
+ echo "<div class='rss-widget'><ul>$content</ul></div>";
302
+
303
+ endif;
304
+ }
305
+
306
+ /**
307
+ * Displays the dashboard widget form control
308
+ *
309
+ * @since 2.7
310
+ */
311
+ public function dashboard_widget_control() {
312
+ if ( !$widget_options = get_option( 'vfb_dashboard_widget_options' ) )
313
+ $widget_options = array();
314
+
315
+ if ( !isset( $widget_options['vfb_dashboard_recent_entries'] ) )
316
+ $widget_options['vfb_dashboard_recent_entries'] = array();
317
+
318
+ if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['vfb-widget-recent-entries'] ) ) {
319
+ $number = absint( $_POST['vfb-widget-recent-entries']['items'] );
320
+ $widget_options['vfb_dashboard_recent_entries']['items'] = $number;
321
+ update_option( 'vfb_dashboard_widget_options', $widget_options );
322
+ }
323
+
324
+ $number = isset( $widget_options['vfb_dashboard_recent_entries']['items'] ) ? (int) $widget_options['vfb_dashboard_recent_entries']['items'] : '';
325
+
326
+ echo sprintf(
327
+ '<p>
328
+ <label for="comments-number">%1$s</label>
329
+ <input id="comments-number" name="vfb-widget-recent-entries[items]" type="text" value="%2$d" size="3" />
330
+ </p>',
331
+ __( 'Number of entries to show:', 'visual-form-builder' ),
332
+ $number
333
+ );
334
+ }
335
 
336
  /**
337
  * Register contextual help. This is for the Help tab dropdown
528
  <p><?php _e( 'Add forms to your Posts or Pages by locating the icon shown below in the area above your post/page editor.', 'visual-form-builder' ); ?><br>
529
  <img src="<?php echo plugins_url( 'visual-form-builder/images/media-button-help.png' ); ?>">
530
  </p>
531
+ <p><?php _e( 'You may also manually insert the shortcode into a post/page.', 'visual-form-builder' ); ?></p>
532
+ <p><?php _e( 'Shortcode', 'visual-form-builder' ); ?> <code>[vfb id='<?php echo (int) $_REQUEST['form']; ?>']</code></p>
533
  <?php
534
  }
535
 
640
  wp_enqueue_script( 'jquery-ui-sortable' );
641
  wp_enqueue_script( 'postbox' );
642
  wp_enqueue_script( 'jquery-form-validation', plugins_url( '/js/jquery.validate.min.js', __FILE__ ), array( 'jquery' ), '1.9.0', true );
643
+ wp_enqueue_script( 'form-elements-add', plugins_url( 'visual-form-builder/js/vfb-admin.js' ) , array( 'jquery', 'jquery-form-validation' ), '', true );
644
  wp_enqueue_script( 'nested-sortable', plugins_url( 'visual-form-builder/js/jquery.ui.nestedSortable.js' ) , array( 'jquery', 'jquery-ui-sortable' ), '', true );
645
 
646
  wp_enqueue_style( 'visual-form-builder-style', plugins_url( "visual-form-builder/css/visual-form-builder-admin.css" ) );
657
 
658
  wp_enqueue_script( 'jquery-form-validation', plugins_url( '/js/jquery.validate.min.js', __FILE__ ), array( 'jquery' ), '1.9.0', true );
659
  wp_enqueue_script( 'jquery-ui-datepicker' );
660
+ wp_enqueue_script( 'visual-form-builder-validation', plugins_url( 'visual-form-builder/js/vfb-validation.js' ) , array( 'jquery', 'jquery-form-validation' ), '', true );
661
  wp_enqueue_script( 'visual-form-builder-metadata', plugins_url( 'visual-form-builder/js/jquery.metadata.js' ) , array( 'jquery', 'jquery-form-validation' ), '', true );
662
  }
663
 
1062
  *
1063
  * @since 1.0
1064
  */
1065
+ public function ajax_sort_field() {
1066
  global $wpdb;
1067
 
1068
  $data = array();
1080
  // Update each field with it's new sequence and parent ID
1081
  $wpdb->update( $this->field_table_name, array( 'field_sequence' => $k, 'field_parent' => $v['parent'] ), array( 'field_id' => $v['field_id'] ) );
1082
  }
1083
+
1084
+ return;
1085
 
1086
  die(1);
1087
  }
1091
  *
1092
  * @since 1.9
1093
  */
1094
+ public function ajax_create_field() {
1095
  global $wpdb;
1096
 
1097
  $data = array();
1185
  *
1186
  * @since 1.9
1187
  */
1188
+ public function ajax_delete_field() {
1189
  global $wpdb;
1190
 
1191
  if ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'toplevel_page_visual-form-builder' && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_delete_field' ) {
1215
  *
1216
  * @since 2.2
1217
  */
1218
+ public function ajax_form_settings() {
1219
  global $current_user;
1220
  get_currentuserinfo();
1221
 
1888
 
1889
  $form_id = ( isset( $_REQUEST['form_id'] ) ) ? (int) esc_html( $_REQUEST['form_id'] ) : '';
1890
 
1891
+ if ( isset( $_REQUEST['visual-form-builder-submit'] ) ) {
1892
  // Get forms
1893
  $order = sanitize_sql_orderby( 'form_id DESC' );
1894
  $forms = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order", $form_id ) );
2044
  // On plugin activation, install the databases and add/update the DB version
2045
  register_activation_hook( __FILE__, array( 'Visual_Form_Builder', 'install_db' ) );
2046
 
2047
+ // The VFB widget
2048
+ require( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-widget.php' );
2049
+
2050
  // Special case to load Export class so AJAX is registered
2051
  require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-export.php' );
2052
  if ( !isset( $export ) )