Formidable Forms – Form Builder for WordPress - Version 2.0.02

Version Description

  • Make sure frm_to_email hook is reverse compatible
  • Fix php example in the shortcode examples
  • Add styling for frm_half classes combined with left or right labels
  • Add a fallback if dbDelta is missing
  • Remove inline js from the draft button in the default HTML to prevent 404/403 errors on some servers. This change only applies to new forms
  • Move the legend tag into the customizable HTML, but without a migration so it won't be added to existing forms
  • Move the "before fields" HTML into the fieldset to it will be parallell with the "After fields" HTML
  • Make sure partial form transients aren't saved for long forms. Make sure it's all or nothing.
  • Make sure the parent_form_id column was added, and try to add it again if it's not there
  • Pro: Allow [25 show=count]. This shortcode will return a count of items instead of the items themselves. Intended for use with a repeating section field, but would work with anything.
  • Pro: Fix filtering by text from a dynamic field
  • Pro: Make sure conditional logic doesn't apply to fields that follow a section with logic
  • Pro: Make sure any post fields used in custom code are included when the post is created
  • Pro: Load the datepicker localization file from the new hosted location
  • Pro: Rework the CSV export generation with lower memory usage and more hooks for easily removing columns
  • Pro: Fix exporting checkbox fields inside a CSV
  • Pro: Update the pagination for Genesis the '...'
  • Pro: Hopefully fix the missing date format issue some users are running into with the datepicker. Unverified since we couldn't replicate.
  • Pro: When creating a new view, make sure the filter and order rows include the fields from the selected form
Download this release

Release Info

Developer sswells
Plugin Icon 128x128 Formidable Forms – Form Builder for WordPress
Version 2.0.02
Comparing to
See all releases

Code changes from version 2.0.01 to 2.0.02

classes/controllers/FrmAppController.php CHANGED
@@ -57,40 +57,9 @@ class FrmAppController {
57
  return $links;
58
  }
59
 
60
- public static function update_action_links( $actions, $plugin ) {
61
- $frm_plugin = FrmAppHelper::plugin_folder() .'/formidable.php';
62
- if ( $frm_plugin != $plugin ) {
63
- return $actions;
64
- }
65
-
66
- $db_version = get_option( 'frm_db_version' );
67
- $pro_db_version = FrmAppHelper::pro_is_installed() ? get_option( 'frmpro_db_version' ) : false;
68
-
69
- if ( ( (int) $db_version < (int) FrmAppHelper::$db_version ) ||
70
- ( FrmAppHelper::pro_is_installed() && (int) $pro_db_version < (int) FrmAppHelper::$pro_db_version ) ) {
71
-
72
- return '<a href="'. add_query_arg( array( 'upgraded' => 'true' ), menu_page_url( 'formidable', 0 ) ) .'">'. __( 'Click here to complete the upgrade', 'formidable' ) .'</a>';
73
-
74
- }
75
-
76
- return $actions;
77
- }
78
-
79
  public static function pro_get_started_headline() {
80
- if ( FrmAppHelper::is_admin_page( 'formidable' ) && isset( $_REQUEST['upgraded'] ) && 'true' == sanitize_title( $_REQUEST['upgraded'] ) ) {
81
- self::install();
82
- ?>
83
- <div id="message" class="frm_message updated"><?php _e( 'Congratulations! Formidable is ready to roll.', 'formidable' ) ?></div>
84
- <?php
85
- return;
86
- }
87
-
88
- // Don't display this error as we're upgrading the thing... cmon
89
- if ( 'upgrade-plugin' == FrmAppHelper::simple_get( 'action', 'sanitize_title' ) ) {
90
- return;
91
- }
92
-
93
- if ( is_multisite() && ! current_user_can( 'administrator' ) ) {
94
  return;
95
  }
96
 
57
  return $links;
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  public static function pro_get_started_headline() {
61
+ // Don't display this error as we're upgrading the thing, or if the user shouldn't see the message
62
+ if ( 'upgrade-plugin' == FrmAppHelper::simple_get( 'action', 'sanitize_title' ) || ! current_user_can( 'update_plugins' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
63
  return;
64
  }
65
 
classes/controllers/FrmHooksController.php CHANGED
@@ -82,7 +82,6 @@ class FrmHooksController {
82
  public static function load_admin_hooks() {
83
  add_action('admin_menu', 'FrmAppController::menu', 1);
84
  add_action('admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
85
- add_filter('update_plugin_complete_actions', 'FrmAppController::update_action_links', 10, 2 );
86
  add_action('admin_notices', 'FrmAppController::pro_get_started_headline' );
87
  add_action( 'admin_init', 'FrmAppController::admin_init', 11 );
88
  register_activation_hook(FrmAppHelper::plugin_path().'/formidable.php', 'FrmAppController::activation_install' );
82
  public static function load_admin_hooks() {
83
  add_action('admin_menu', 'FrmAppController::menu', 1);
84
  add_action('admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
 
85
  add_action('admin_notices', 'FrmAppController::pro_get_started_headline' );
86
  add_action( 'admin_init', 'FrmAppController::admin_init', 11 );
87
  register_activation_hook(FrmAppHelper::plugin_path().'/formidable.php', 'FrmAppController::activation_install' );
classes/helpers/FrmAppHelper.php CHANGED
@@ -4,13 +4,13 @@ if ( ! defined('ABSPATH') ) {
4
  }
5
 
6
  class FrmAppHelper {
7
- public static $db_version = 22; //version of the database we are moving to
8
- public static $pro_db_version = 27;
9
 
10
- /**
11
- * @since 2.0
12
- */
13
- public static $plug_version = '2.0.01';
14
 
15
  /**
16
  * @since 1.07.02
@@ -763,13 +763,17 @@ class FrmAppHelper {
763
  /**
764
  * Flatten a multi-dimensional array
765
  */
766
- public static function array_flatten( $array ) {
767
  $return = array();
768
  foreach ( $array as $key => $value ) {
769
  if ( is_array($value) ) {
770
- $return = array_merge( $return, self::array_flatten($value) );
771
  } else {
772
- $return[ $key ] = $value;
 
 
 
 
773
  }
774
  }
775
  return $return;
4
  }
5
 
6
  class FrmAppHelper {
7
+ public static $db_version = 23; //version of the database we are moving to
8
+ public static $pro_db_version = 27;
9
 
10
+ /**
11
+ * @since 2.0
12
+ */
13
+ public static $plug_version = '2.0.02';
14
 
15
  /**
16
  * @since 1.07.02
763
  /**
764
  * Flatten a multi-dimensional array
765
  */
766
+ public static function array_flatten( $array, $keys = 'keep' ) {
767
  $return = array();
768
  foreach ( $array as $key => $value ) {
769
  if ( is_array($value) ) {
770
+ $return = array_merge( $return, self::array_flatten( $value, $keys ) );
771
  } else {
772
+ if ( $keys == 'keep' ) {
773
+ $return[ $key ] = $value;
774
+ } else {
775
+ $return[] = $value;
776
+ }
777
  }
778
  }
779
  return $return;
classes/helpers/FrmEntriesHelper.php CHANGED
@@ -219,13 +219,13 @@ class FrmEntriesHelper {
219
  }
220
  }
221
  }
222
-
223
- // Don't include blank values
224
- if ( ! $atts['include_blank'] && FrmAppHelper::is_empty_value( $atts['entry']->metas[ $f->id ] ) ) {
225
- return;
226
- }
227
  }
228
 
 
 
 
 
 
229
  $val = '';
230
  if ( $atts['entry'] ) {
231
  $prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] );
219
  }
220
  }
221
  }
 
 
 
 
 
222
  }
223
 
224
+ // Don't include blank values
225
+ if ( ! $atts['include_blank'] && isset( $atts['entry']->metas[ $f->id ] ) && FrmAppHelper::is_empty_value( $atts['entry']->metas[ $f->id ] ) ) {
226
+ return;
227
+ }
228
+
229
  $val = '';
230
  if ( $atts['entry'] ) {
231
  $prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] );
classes/helpers/FrmFormsHelper.php CHANGED
@@ -233,6 +233,7 @@ $draft_link
233
  SUBMIT_HTML;
234
  } else if ( $loc == 'before' ) {
235
  $default_html = <<<BEFORE_HTML
 
236
  [if form_name]<h3>[form_name]</h3>[/if form_name]
237
  [if form_description]<div class="frm_description">[form_description]</div>[/if form_description]
238
  BEFORE_HTML;
@@ -244,7 +245,7 @@ BEFORE_HTML;
244
  }
245
 
246
  public static function get_draft_link() {
247
- $link = '[if save_draft]<a href="javascript:void(0)" class="frm_save_draft" [draft_hook]>[draft_label]</a>[/if save_draft]';
248
  return $link;
249
  }
250
 
233
  SUBMIT_HTML;
234
  } else if ( $loc == 'before' ) {
235
  $default_html = <<<BEFORE_HTML
236
+ <legend class="frm_hidden">[form_name]</legend>
237
  [if form_name]<h3>[form_name]</h3>[/if form_name]
238
  [if form_description]<div class="frm_description">[form_description]</div>[/if form_description]
239
  BEFORE_HTML;
245
  }
246
 
247
  public static function get_draft_link() {
248
+ $link = '[if save_draft]<a href="#" class="frm_save_draft" [draft_hook]>[draft_label]</a>[/if save_draft]';
249
  return $link;
250
  }
251
 
classes/helpers/FrmXMLHelper.php CHANGED
@@ -513,7 +513,7 @@ class FrmXMLHelper {
513
  }
514
 
515
  if ( ! is_array($result) ) {
516
- $message = $result;
517
  return;
518
  }
519
 
513
  }
514
 
515
  if ( ! is_array($result) ) {
516
+ $message = is_string( $result ) ? $result : print_r( $result, 1 );
517
  return;
518
  }
519
 
classes/models/FrmDb.php CHANGED
@@ -28,7 +28,7 @@ class FrmDb {
28
  }
29
 
30
  if ( $frm_db_version != $old_db_version ) {
31
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
32
 
33
  $this->create_tables();
34
  $this->migrate_data($frm_db_version, $old_db_version);
@@ -142,7 +142,12 @@ class FrmDb {
142
  )';
143
 
144
  foreach ( $sql as $q ) {
145
- dbDelta($q . $charset_collate .';');
 
 
 
 
 
146
  unset($q);
147
  }
148
  }
@@ -151,7 +156,7 @@ class FrmDb {
151
  * @param integer $frm_db_version
152
  */
153
  private function migrate_data($frm_db_version, $old_db_version) {
154
- $migrations = array(4, 6, 11, 16, 17);
155
  foreach ( $migrations as $migration ) {
156
  if ( $frm_db_version >= $migration && $old_db_version < $migration ) {
157
  $function_name = 'migrate_to_'. $migration;
@@ -487,6 +492,20 @@ class FrmDb {
487
  return true;
488
  }
489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  /**
491
  * Change field size from character to pixel -- Multiply by 9
492
  */
28
  }
29
 
30
  if ( $frm_db_version != $old_db_version ) {
31
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
32
 
33
  $this->create_tables();
34
  $this->migrate_data($frm_db_version, $old_db_version);
142
  )';
143
 
144
  foreach ( $sql as $q ) {
145
+ if ( function_exists( 'dbDelta' ) ) {
146
+ dbDelta( $q . $charset_collate .';' );
147
+ } else {
148
+ global $wpdb;
149
+ $wpdb->query( $q . $charset_collate );
150
+ }
151
  unset($q);
152
  }
153
  }
156
  * @param integer $frm_db_version
157
  */
158
  private function migrate_data($frm_db_version, $old_db_version) {
159
+ $migrations = array( 4, 6, 11, 16, 17, 23 );
160
  foreach ( $migrations as $migration ) {
161
  if ( $frm_db_version >= $migration && $old_db_version < $migration ) {
162
  $function_name = 'migrate_to_'. $migration;
492
  return true;
493
  }
494
 
495
+ /**
496
+ * Check if the parent_form_id columns exists.
497
+ * If not, try and add it again
498
+ *
499
+ * @since 2.0.2
500
+ */
501
+ private function migrate_to_23() {
502
+ global $wpdb;
503
+ $exists = $wpdb->get_row( 'SHOW COLUMNS FROM '. $this->forms .' LIKE "parent_form_id"' );
504
+ if ( empty( $exists ) ) {
505
+ $wpdb->query( 'ALTER TABLE '. $this->forms .' ADD parent_form_id int(11) default 0' );
506
+ }
507
+ }
508
+
509
  /**
510
  * Change field size from character to pixel -- Multiply by 9
511
  */
classes/models/FrmField.php CHANGED
@@ -446,7 +446,7 @@ class FrmField{
446
  if ( $next_fields ) {
447
  $fields = array_merge( $fields, $next_fields );
448
 
449
- if ( count( $next_fields ) == self::$transient_size ) {
450
  // if this transient is full, check for another
451
  $next++;
452
  self::get_next_transient( $fields, $base_name, $next );
@@ -464,7 +464,16 @@ class FrmField{
464
 
465
  foreach ( $field_chunks as $field ) {
466
  $name = $next ? $base_name . $next : $base_name;
467
- set_transient( $name, $field, 60 * 60 * 6 );
 
 
 
 
 
 
 
 
 
468
  $next++;
469
  }
470
  }
446
  if ( $next_fields ) {
447
  $fields = array_merge( $fields, $next_fields );
448
 
449
+ if ( count( $next_fields ) >= self::$transient_size ) {
450
  // if this transient is full, check for another
451
  $next++;
452
  self::get_next_transient( $fields, $base_name, $next );
464
 
465
  foreach ( $field_chunks as $field ) {
466
  $name = $next ? $base_name . $next : $base_name;
467
+ $set = set_transient( $name, $field, 60 * 60 * 6 );
468
+ if( ! $set ) {
469
+ // the transient didn't save
470
+ if ( $name != $base_name ) {
471
+ // if the first saved an others fail, this will show an incmoplete form
472
+ self::delete_form_transient( $form_id );
473
+ }
474
+ return;
475
+ }
476
+
477
  $next++;
478
  }
479
  }
classes/models/FrmFormAction.php CHANGED
@@ -210,7 +210,7 @@ class FrmFormAction {
210
 
211
  $action->menu_order = $form_id;
212
  $switch = $this->get_global_switch_fields();
213
- foreach ( $action->post_content as $key => $val ) {
214
  if ( is_numeric($val) && isset($frm_duplicate_ids[$val]) ) {
215
  $action->post_content[$key] = $frm_duplicate_ids[$val];
216
  } else if ( ! is_array( $val ) ) {
210
 
211
  $action->menu_order = $form_id;
212
  $switch = $this->get_global_switch_fields();
213
+ foreach ( (array) $action->post_content as $key => $val ) {
214
  if ( is_numeric($val) && isset($frm_duplicate_ids[$val]) ) {
215
  $action->post_content[$key] = $frm_duplicate_ids[$val];
216
  } else if ( ! is_array( $val ) ) {
classes/models/FrmNotification.php CHANGED
@@ -73,7 +73,7 @@ class FrmNotification{
73
  $cc = self::explode_emails( $notification['cc'] );
74
  $bcc = self::explode_emails( $notification['bcc'] );
75
 
76
- $to_emails = apply_filters('frm_to_email', $to_emails, array(), $form->id, compact('email_key', 'entry', 'form'));
77
 
78
  // Stop now if there aren't any recipients
79
  if ( empty( $to_emails ) && empty( $cc ) && empty( $bcc ) ) {
73
  $cc = self::explode_emails( $notification['cc'] );
74
  $bcc = self::explode_emails( $notification['bcc'] );
75
 
76
+ $to_emails = apply_filters('frm_to_email', $to_emails, $values, $form->id, compact('email_key', 'entry', 'form'));
77
 
78
  // Stop now if there aren't any recipients
79
  if ( empty( $to_emails ) && empty( $cc ) && empty( $bcc ) ) {
classes/views/frm-entries/form.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
2
  global $frm_vars;
3
  FrmFormsHelper::form_loaded($form, $values['custom_style'], $frm_vars['load_css']);
4
-
5
- echo FrmFormsHelper::replace_shortcodes($values['before_html'], $form, $title, $description); ?>
6
  <div class="frm_form_fields <?php echo apply_filters('frm_form_fields_class', '', $values); ?>">
7
  <fieldset>
8
- <legend class="frm_hidden"><?php echo wp_kses($form->name, array()); ?></legend>
9
  <input type="hidden" name="frm_action" value="<?php echo esc_attr($form_action) ?>" />
10
  <input type="hidden" name="form_id" value="<?php echo esc_attr($form->id) ?>" />
11
  <input type="hidden" name="form_key" value="<?php echo esc_attr($form->form_key) ?>" />
1
  <?php
2
  global $frm_vars;
3
  FrmFormsHelper::form_loaded($form, $values['custom_style'], $frm_vars['load_css']);
4
+ ?>
 
5
  <div class="frm_form_fields <?php echo apply_filters('frm_form_fields_class', '', $values); ?>">
6
  <fieldset>
7
+ <?php echo FrmFormsHelper::replace_shortcodes( $values['before_html'], $form, $title, $description ); ?>
8
  <input type="hidden" name="frm_action" value="<?php echo esc_attr($form_action) ?>" />
9
  <input type="hidden" name="form_id" value="<?php echo esc_attr($form->id) ?>" />
10
  <input type="hidden" name="form_key" value="<?php echo esc_attr($form->form_key) ?>" />
classes/views/frm-forms/_publish_box.php CHANGED
@@ -53,7 +53,7 @@
53
  </p>
54
 
55
  <p class="howto"><?php _e( 'Insert in a template', 'formidable' ) ?>:</p>
56
- <p><input type="text" readonly="true" class="frm_select_box frm_insert_in_template" value="&lt;?php echo FrmFormsController::get_form_shortcode( array( 'id' => $id, 'title' => false, 'description' => false)); ?&gt;" /></p>
57
 
58
  <p><a href="#edit_frm_shortcode" class="cancel-frm_shortcode hide-if-no-js"><?php _e( 'Hide', 'formidable' ); ?></a></p>
59
  </div>
53
  </p>
54
 
55
  <p class="howto"><?php _e( 'Insert in a template', 'formidable' ) ?>:</p>
56
+ <p><input type="text" readonly="true" class="frm_select_box frm_insert_in_template" value="&lt;?php echo FrmFormsController::get_form_shortcode( array( 'id' => <?php echo absint( $id ) ?>, 'title' => false, 'description' => false ) ); ?&gt;" /></p>
57
 
58
  <p><a href="#edit_frm_shortcode" class="cancel-frm_shortcode hide-if-no-js"><?php _e( 'Hide', 'formidable' ); ?></a></p>
59
  </div>
classes/views/frm-forms/insert_form_popup.php CHANGED
@@ -1,5 +1,5 @@
1
 
2
- <div id="frm_insert_form" class="frm_hidden">
3
  <div id="frm_popup_content">
4
  <div class="media-modal wp-core-ui">
5
  <a href="#" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close panel', 'formidable' ) ?></span></span></a>
1
 
2
+ <div id="frm_insert_form" class="frm_hidden hidden">
3
  <div id="frm_popup_content">
4
  <div class="media-modal wp-core-ui">
5
  <a href="#" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close panel', 'formidable' ) ?></span></span></a>
classes/views/styles/_sample_form.php CHANGED
@@ -50,14 +50,18 @@
50
 
51
  <div class="frm_form_field form-field frm_first_half <?php echo esc_attr( $pos_class ) ?>">
52
  <label class="frm_primary_label"><?php _e( 'Radio Buttons', 'formidable' ) ?></label>
53
- <div class="frm_radio"><input type="radio" /><label><?php _e( 'Option 1', 'formidable' ) ?></label></div>
54
- <div class="frm_radio"><input type="radio" /><label><?php _e( 'Option 2', 'formidable' ) ?></label></div>
 
 
55
  </div>
56
 
57
  <div class="frm_form_field form-field frm_last_half <?php echo esc_attr( $pos_class ) ?>">
58
  <label class="frm_primary_label"><?php _e( 'Check Boxes', 'formidable' ) ?></label>
59
- <div class="frm_checkbox"><label><input type="checkbox" /><?php _e( 'Option 1', 'formidable' ) ?></label></div>
60
- <div class="frm_checkbox"><label><input type="checkbox" /><?php _e( 'Option 2', 'formidable' ) ?></label></div>
 
 
61
  </div>
62
  </div>
63
  </div>
50
 
51
  <div class="frm_form_field form-field frm_first_half <?php echo esc_attr( $pos_class ) ?>">
52
  <label class="frm_primary_label"><?php _e( 'Radio Buttons', 'formidable' ) ?></label>
53
+ <div class="frm_opt_container">
54
+ <div class="frm_radio"><input type="radio" /><label><?php _e( 'Option 1', 'formidable' ) ?></label></div>
55
+ <div class="frm_radio"><input type="radio" /><label><?php _e( 'Option 2', 'formidable' ) ?></label></div>
56
+ </div>
57
  </div>
58
 
59
  <div class="frm_form_field form-field frm_last_half <?php echo esc_attr( $pos_class ) ?>">
60
  <label class="frm_primary_label"><?php _e( 'Check Boxes', 'formidable' ) ?></label>
61
+ <div class="frm_opt_container">
62
+ <div class="frm_checkbox"><label><input type="checkbox" /><?php _e( 'Option 1', 'formidable' ) ?></label></div>
63
+ <div class="frm_checkbox"><label><input type="checkbox" /><?php _e( 'Option 2', 'formidable' ) ?></label></div>
64
+ </div>
65
  </div>
66
  </div>
67
  </div>
css/_single_theme.css.php CHANGED
@@ -171,6 +171,7 @@ if ( ! isset($collapse_icon) ) {
171
  .<?php echo $style_class ?> .frm_left_container div.frm_description,
172
  .<?php echo $style_class ?> .frm_left_container .frm_error{
173
  margin-left:<?php echo $label_margin ?>px;
 
174
  }
175
 
176
  .<?php echo $style_class ?> .form-field.frm_col_field div.frm_description{
@@ -188,6 +189,7 @@ if ( ! isset($collapse_icon) ) {
188
  .<?php echo $style_class ?> .frm_right_container div.frm_description,
189
  .<?php echo $style_class ?> .frm_right_container .frm_error{
190
  margin-right:<?php echo $label_margin ?>px<?php echo $important ?>;
 
191
  }
192
 
193
  .<?php echo $style_class ?> .frm_inline_container label.frm_primary_label,
@@ -198,7 +200,7 @@ if ( ! isset($collapse_icon) ) {
198
  .<?php echo $style_class ?> .frm_left_container label.frm_primary_label{
199
  display:inline<?php echo $important ?>;
200
  width:<?php echo $width . $important ?>;
201
- max-width:25%<?php echo $important ?>;
202
  margin-right:10px<?php echo $important ?>;
203
  }
204
 
@@ -209,14 +211,28 @@ if ( ! isset($collapse_icon) ) {
209
  .<?php echo $style_class ?> .frm_form_field.frm_left_container input,
210
  .<?php echo $style_class ?> .frm_form_field.frm_left_container select,
211
  .<?php echo $style_class ?> .frm_form_field.frm_left_container textarea,
 
212
  .<?php echo $style_class ?> .frm_form_field.frm_right_container input,
213
  .<?php echo $style_class ?> .frm_form_field.frm_right_container select,
214
- .<?php echo $style_class ?> .frm_form_field.frm_right_container textarea{
215
- max-width:68%<?php echo $important ?>;
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
 
218
  .<?php echo $style_class ?> .frm_right_container label.frm_primary_label{
219
- max-width:25%<?php echo $important ?>;
220
  margin-left:10px<?php echo $important ?>;
221
  }
222
 
@@ -494,14 +510,6 @@ if ( ! $submit_style ) { ?>
494
  display:<?php echo $radio_align . $important ?>;
495
  }
496
 
497
- .<?php echo $style_class ?> .frm_left_container .frm_radio{
498
- margin<?php echo ($radio_align == 'block' ? "-left:{$label_margin}px;" : ':0') . $important; ?>
499
- }
500
-
501
- .<?php echo $style_class ?> .frm_right_container .frm_radio{
502
- margin<?php echo ($radio_align == 'block' ? "-right:{$label_margin}px;" : ':0') . $important; ?>
503
- }
504
-
505
  .<?php echo $style_class ?> .horizontal_radio .frm_radio{
506
  margin:0 5px 0 0<?php echo $important ?>;
507
  }
@@ -510,14 +518,6 @@ if ( ! $submit_style ) { ?>
510
  display:<?php echo $check_align . $important ?>;
511
  }
512
 
513
- .<?php echo $style_class ?> .frm_left_container .frm_checkbox{
514
- margin<?php echo ($check_align == 'block') ? "-left:{$label_margin}px;" : ':0'; ?>
515
- }
516
-
517
- .<?php echo $style_class ?> .frm_right_container .frm_checkbox{
518
- margin<?php echo ($check_align == 'block') ? "-right:{$label_margin}px;" : ':0'; ?>
519
- }
520
-
521
  .<?php echo $style_class ?> .horizontal_radio .frm_checkbox,
522
  .<?php echo $style_class ?> .horizontal_radio .frm_radio,
523
  .horizontal_radio .frm_catlevel_1{
171
  .<?php echo $style_class ?> .frm_left_container div.frm_description,
172
  .<?php echo $style_class ?> .frm_left_container .frm_error{
173
  margin-left:<?php echo $label_margin ?>px;
174
+ max-width:62%<?php echo $important ?>;
175
  }
176
 
177
  .<?php echo $style_class ?> .form-field.frm_col_field div.frm_description{
189
  .<?php echo $style_class ?> .frm_right_container div.frm_description,
190
  .<?php echo $style_class ?> .frm_right_container .frm_error{
191
  margin-right:<?php echo $label_margin ?>px<?php echo $important ?>;
192
+ max-width:62%<?php echo $important ?>;
193
  }
194
 
195
  .<?php echo $style_class ?> .frm_inline_container label.frm_primary_label,
200
  .<?php echo $style_class ?> .frm_left_container label.frm_primary_label{
201
  display:inline<?php echo $important ?>;
202
  width:<?php echo $width . $important ?>;
203
+ max-width:33%<?php echo $important ?>;
204
  margin-right:10px<?php echo $important ?>;
205
  }
206
 
211
  .<?php echo $style_class ?> .frm_form_field.frm_left_container input,
212
  .<?php echo $style_class ?> .frm_form_field.frm_left_container select,
213
  .<?php echo $style_class ?> .frm_form_field.frm_left_container textarea,
214
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container .frm_opt_container,
215
  .<?php echo $style_class ?> .frm_form_field.frm_right_container input,
216
  .<?php echo $style_class ?> .frm_form_field.frm_right_container select,
217
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container textarea,
218
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container .frm_opt_container{
219
+ max-width:62%<?php echo $important ?>;
220
+ }
221
+
222
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container .frm_opt_container,
223
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container .frm_opt_container{
224
+ display:inline-block<?php echo $important ?>;
225
+ }
226
+
227
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container input[type=checkbox],
228
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container input[type=radio],
229
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container input[type=checkbox],
230
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container input[type=radio]{
231
+ max-width:100%<?php echo $important ?>;
232
  }
233
 
234
  .<?php echo $style_class ?> .frm_right_container label.frm_primary_label{
235
+ max-width:33%<?php echo $important ?>;
236
  margin-left:10px<?php echo $important ?>;
237
  }
238
 
510
  display:<?php echo $radio_align . $important ?>;
511
  }
512
 
 
 
 
 
 
 
 
 
513
  .<?php echo $style_class ?> .horizontal_radio .frm_radio{
514
  margin:0 5px 0 0<?php echo $important ?>;
515
  }
518
  display:<?php echo $check_align . $important ?>;
519
  }
520
 
 
 
 
 
 
 
 
 
521
  .<?php echo $style_class ?> .horizontal_radio .frm_checkbox,
522
  .<?php echo $style_class ?> .horizontal_radio .frm_radio,
523
  .horizontal_radio .frm_catlevel_1{
css/custom_theme.css.php CHANGED
@@ -458,6 +458,10 @@ table.form_results.with_frm_style tr.frm_odd,
458
  background-image:none;
459
  }
460
 
 
 
 
 
461
  .frm_pagination_cont ul.frm_pagination > li:first-child{
462
  margin-left:0;
463
  }
@@ -715,7 +719,7 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
715
  -webkit-box-sizing:border-box;
716
  -moz-box-sizing:border-box;
717
  box-sizing:border-box;
718
- max-width:25%;
719
  margin-right:0;
720
  margin-left:0;
721
  }
@@ -736,6 +740,30 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
736
  padding-left:10px;
737
  }
738
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739
  .frm_form_field.frm_left_third,
740
  .frm_form_field.frm_third,
741
  .frm_form_field.frm_right_third,
@@ -1724,6 +1752,22 @@ html[xmlns] .frm_clearfix{
1724
  float: none;
1725
  display:block;
1726
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1727
  }
1728
  <?php
1729
  echo $defaults['custom_css'];
458
  background-image:none;
459
  }
460
 
461
+ ul.frm_pagination > li.active a{
462
+ text-decoration:none;
463
+ }
464
+
465
  .frm_pagination_cont ul.frm_pagination > li:first-child{
466
  margin-left:0;
467
  }
719
  -webkit-box-sizing:border-box;
720
  -moz-box-sizing:border-box;
721
  box-sizing:border-box;
722
+ max-width:33%;
723
  margin-right:0;
724
  margin-left:0;
725
  }
740
  padding-left:10px;
741
  }
742
 
743
+ .with_frm_style .frm_form_field.frm_first_half.frm_right_container div.frm_description,
744
+ .with_frm_style .frm_form_field.frm_first_half.frm_right_container .frm_error,
745
+ .with_frm_style .frm_form_field.frm_first_half .frm_right_container div.frm_description,
746
+ .with_frm_style .frm_form_field.frm_first_half .frm_right_container .frm_error,
747
+ .with_frm_style .frm_form_field.frm_last_half.frm_right_container div.frm_description,
748
+ .with_frm_style .frm_form_field.frm_last_half.frm_right_container .frm_error,
749
+ .with_frm_style .frm_form_field.frm_half.frm_right_container div.frm_description,
750
+ .with_frm_style .frm_form_field.frm_half.frm_right_container .frm_error{
751
+ margin-right:33%;
752
+ padding-right:12px;
753
+ }
754
+
755
+ .with_frm_style .frm_form_field.frm_first_half.frm_left_container div.frm_description,
756
+ .with_frm_style .frm_form_field.frm_first_half.frm_left_container .frm_error,
757
+ .with_frm_style .frm_form_field.frm_first_half .frm_left_container div.frm_description,
758
+ .with_frm_style .frm_form_field.frm_first_half .frm_left_container .frm_error,
759
+ .with_frm_style .frm_form_field.frm_last_half.frm_left_container div.frm_description,
760
+ .with_frm_style .frm_form_field.frm_last_half.frm_left_container .frm_error,
761
+ .with_frm_style .frm_form_field.frm_half.frm_left_container div.frm_description,
762
+ .with_frm_style .frm_form_field.frm_half.frm_left_container .frm_error{
763
+ margin-left:33%;
764
+ padding-left:12px;
765
+ }
766
+
767
  .frm_form_field.frm_left_third,
768
  .frm_form_field.frm_third,
769
  .frm_form_field.frm_right_third,
1752
  float: none;
1753
  display:block;
1754
  }
1755
+
1756
+ .frm_right_container p.description,
1757
+ .frm_right_container div.description,
1758
+ .frm_right_container div.frm_description,
1759
+ .frm_right_container .frm_error{
1760
+ margin-right:33% !important;
1761
+ padding-right:12px !important;
1762
+ }
1763
+
1764
+ .frm_left_container p.description,
1765
+ .frm_left_container div.description,
1766
+ .frm_left_container div.frm_description,
1767
+ .frm_left_container .frm_error{
1768
+ margin-left:33% !important;
1769
+ padding-left:12px !important;
1770
+ }
1771
  }
1772
  <?php
1773
  echo $defaults['custom_css'];
formidable.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Formidable
4
  Description: Quickly and easily create drag-and-drop forms
5
- Version: 2.0.01
6
  Plugin URI: http://formidablepro.com/
7
  Author URI: http://strategy11.com
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 2.0.02
6
  Plugin URI: http://formidablepro.com/
7
  Author URI: http://strategy11.com
8
  Author: Strategy11
js/formidable.min.js CHANGED
@@ -1,4 +1,4 @@
1
- function frmFrontFormJS(){function k(b){var a=jQuery(this),c=a.attr("type");"submit"!=c&&b.preventDefault();b=a.parents("form:first");var e=a="",f=this.name;if("frm_prev_page"==f||-1!==this.className.indexOf("frm_prev_page"))a=jQuery(b).find(".frm_next_page").attr("id").replace("frm_next_p_","");else if("frm_save_draft"==f||-1!==this.className.indexOf("frm_save_draft"))e=1;jQuery(".frm_next_page").val(a);jQuery(".frm_saving_draft").val(e);"submit"!=c&&b.trigger("submit")}function n(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");
2
  jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}function u(){this.className=this.className.replace("frm_transparent","");this.parentNode.getElementsByTagName("a")[0].className+=" frm_hidden"}function y(){var b=this.type,a=!1,c=!1;if("select-one"==b)c=!0,"frm_other_trigger"==this.options[this.selectedIndex].className&&(a=!0);else if("select-multiple"==b)for(var c=!0,e=this.options,a=!1,f=0;f<e.length;f++)if("frm_other_trigger"==
3
  e[f].className&&e[f].selected){a=!0;break}c?(b=jQuery(this).parent().children(".frm_other_input"),a?b[0].className=b[0].className.replace("frm_pos_none",""):(1>b[0].className.indexOf("frm_pos_none")&&(b[0].className+=" frm_pos_none"),b[0].value="")):"radio"==b?(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):"checkbox"==b&&(this.checked?jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none"):
4
  jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}function A(b){var a=this.name.replace("item_meta[","").split("]"),c=a[0];c&&(jQuery('input[name="item_meta['+c+'][form]"]').length&&(c=a[2].replace("[","")),q("und",c,null,jQuery(this)),M(b,c))}function q(b,a,c,e,f){if("undefined"!=typeof __FRMRULES){var g=__FRMRULES[a];if("undefined"!=typeof g){if("undefined"==typeof c||null===c)c="go";"persist"!=f&&(m=[]);f=[];for(var h=0,p=g.length;h<p;h++){var r=
1
+ function frmFrontFormJS(){function k(b){var a=jQuery(this),c=a.attr("type");"submit"!=c&&b.preventDefault();b=a.parents("form:first");var e=a="",f=this.name;if("frm_prev_page"==f||-1!==this.className.indexOf("frm_prev_page"))a=jQuery(b).find(".frm_next_page").attr("id").replace("frm_next_p_","");else if("frm_save_draft"==f||-1!==this.className.indexOf("frm_save_draft"))e=1;jQuery(".frm_next_page").val(a);jQuery(".frm_saving_draft").val(e);"submit"!=c&&b.trigger("submit");}function n(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");
2
  jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}function u(){this.className=this.className.replace("frm_transparent","");this.parentNode.getElementsByTagName("a")[0].className+=" frm_hidden"}function y(){var b=this.type,a=!1,c=!1;if("select-one"==b)c=!0,"frm_other_trigger"==this.options[this.selectedIndex].className&&(a=!0);else if("select-multiple"==b)for(var c=!0,e=this.options,a=!1,f=0;f<e.length;f++)if("frm_other_trigger"==
3
  e[f].className&&e[f].selected){a=!0;break}c?(b=jQuery(this).parent().children(".frm_other_input"),a?b[0].className=b[0].className.replace("frm_pos_none",""):(1>b[0].className.indexOf("frm_pos_none")&&(b[0].className+=" frm_pos_none"),b[0].value="")):"radio"==b?(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):"checkbox"==b&&(this.checked?jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none"):
4
  jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}function A(b){var a=this.name.replace("item_meta[","").split("]"),c=a[0];c&&(jQuery('input[name="item_meta['+c+'][form]"]').length&&(c=a[2].replace("[","")),q("und",c,null,jQuery(this)),M(b,c))}function q(b,a,c,e,f){if("undefined"!=typeof __FRMRULES){var g=__FRMRULES[a];if("undefined"!=typeof g){if("undefined"==typeof c||null===c)c="go";"persist"!=f&&(m=[]);f=[];for(var h=0,p=g.length;h<p;h++){var r=
js/formidable_admin.js CHANGED
@@ -1410,6 +1410,7 @@ function frmAdminBuildJS(){
1410
 
1411
  function displayFormSelected(){
1412
  var form_id = jQuery(this).val();
 
1413
  if (form_id === ''){
1414
  return;
1415
  }
1410
 
1411
  function displayFormSelected(){
1412
  var form_id = jQuery(this).val();
1413
+ this_form_id = form_id; // set the global form id
1414
  if (form_id === ''){
1415
  return;
1416
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://formidablepro.com/donate
4
  Tags: admin, AJAX, captcha, contact, contact form, database, email, feedback, form, forms, javascript, jquery, page, plugin, poll, Post, spam, survey, template, widget, wpmu, form builder
5
  Requires at least: 3.3.3
6
  Tested up to: 4.2
7
- Stable tag: 2.0.01
8
 
9
  Beautiful forms in 60 seconds. The WordPress form builder that enables you to create forms with a simple drag-and-drop interface and in-place editing.
10
 
@@ -89,6 +89,27 @@ A. Try clearing your browser cache. As plugin modifications are made, frequent j
89
  [See more FAQs](http://formidablepro.com/formidable-faqs/ "Formidable Form FAQs")
90
 
91
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  = 2.0.01 =
93
  * Break transients into chunks for large forms ( > 200 fields )
94
  * Remove the upgrade link and perform the upgrade automatically
4
  Tags: admin, AJAX, captcha, contact, contact form, database, email, feedback, form, forms, javascript, jquery, page, plugin, poll, Post, spam, survey, template, widget, wpmu, form builder
5
  Requires at least: 3.3.3
6
  Tested up to: 4.2
7
+ Stable tag: 2.0.02
8
 
9
  Beautiful forms in 60 seconds. The WordPress form builder that enables you to create forms with a simple drag-and-drop interface and in-place editing.
10
 
89
  [See more FAQs](http://formidablepro.com/formidable-faqs/ "Formidable Form FAQs")
90
 
91
  == Changelog ==
92
+ = 2.0.02 =
93
+ * Make sure frm_to_email hook is reverse compatible
94
+ * Fix php example in the shortcode examples
95
+ * Add styling for frm_half classes combined with left or right labels
96
+ * Add a fallback if dbDelta is missing
97
+ * Remove inline js from the draft button in the default HTML to prevent 404/403 errors on some servers. This change only applies to new forms
98
+ * Move the legend tag into the customizable HTML, but without a migration so it won't be added to existing forms
99
+ * Move the "before fields" HTML into the fieldset to it will be parallell with the "After fields" HTML
100
+ * Make sure partial form transients aren't saved for long forms. Make sure it's all or nothing.
101
+ * Make sure the parent_form_id column was added, and try to add it again if it's not there
102
+ * Pro: Allow [25 show=count]. This shortcode will return a count of items instead of the items themselves. Intended for use with a repeating section field, but would work with anything.
103
+ * Pro: Fix filtering by text from a dynamic field
104
+ * Pro: Make sure conditional logic doesn't apply to fields that follow a section with logic
105
+ * Pro: Make sure any post fields used in custom code are included when the post is created
106
+ * Pro: Load the datepicker localization file from the new hosted location
107
+ * Pro: Rework the CSV export generation with lower memory usage and more hooks for easily removing columns
108
+ * Pro: Fix exporting checkbox fields inside a CSV
109
+ * Pro: Update the pagination for Genesis the '...'
110
+ * Pro: Hopefully fix the missing date format issue some users are running into with the datepicker. Unverified since we couldn't replicate.
111
+ * Pro: When creating a new view, make sure the filter and order rows include the fields from the selected form
112
+
113
  = 2.0.01 =
114
  * Break transients into chunks for large forms ( > 200 fields )
115
  * Remove the upgrade link and perform the upgrade automatically