Formidable Forms – Form Builder for WordPress - Version 2.0.04

Version Description

  • Fix XSS vulnerability from add_query_args and remove_query_args
  • Remove unneeded options from the form widget and switch old styling setting width from 400px to 100%
  • Fix the new form class box in the customizable HTML
  • Remove WP support for v3.5 and lower
  • Don't require the captcha if the keys haven't been configured
  • Styling enhancements for left and right label settings
  • Deactivate plugin after uninstall to prevent tables from being added back
  • Add frm_text_block class to Layout tab
  • Fix migration of email settigns that haven't been updated in over two years
  • Fix emailing from only a multiple word name with no email
  • Send emails for WordPress default if trying to send from Yahoo
  • Pro: Trigger calculation update each time a row is added or removed from repeating section
  • Pro: Allow phone format inside of repeating sections
  • Pro: Add allow=everyone option to frm-entry-update-field shortcode to prevent permission checking when updating a single field
  • Pro: Fix graph limit defaulting to 10 and the min and max options
  • Pro: Fix CSV download vulnerability without permission check
  • Pro: Fix searching by field on entry listing page
  • Pro: Fix exporting multiple entries with the bulk CSV export option
  • Pro: Fix Entry ID filter in views when using a comma separated list of ids
  • Pro: Fix 3+ level dynamic fields to hide the last field when the first is changed
  • Pro: Fix apostraphes in form action logic
Download this release

Release Info

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

Code changes from version 2.0.03 to 2.0.04

Files changed (54) hide show
  1. classes/controllers/FrmAppController.php +7 -16
  2. classes/controllers/FrmEntriesController.php +2 -2
  3. classes/controllers/FrmFieldsController.php +4 -4
  4. classes/controllers/FrmFormsController.php +4 -11
  5. classes/controllers/FrmHooksController.php +3 -0
  6. classes/controllers/FrmStylesController.php +1 -1
  7. classes/controllers/FrmXMLController.php +2 -2
  8. classes/helpers/FrmAppHelper.php +48 -26
  9. classes/helpers/FrmEntriesHelper.php +0 -2
  10. classes/helpers/FrmEntriesListHelper.php +6 -6
  11. classes/helpers/FrmFieldsHelper.php +7 -2
  12. classes/helpers/FrmFormActionsHelper.php +27 -12
  13. classes/helpers/FrmFormsHelper.php +7 -7
  14. classes/helpers/FrmFormsListHelper.php +9 -9
  15. classes/helpers/FrmStylesHelper.php +3 -3
  16. classes/helpers/FrmXMLHelper.php +6 -12
  17. classes/models/FrmDb.php +24 -1
  18. classes/models/FrmEntry.php +15 -4
  19. classes/models/FrmField.php +1 -1
  20. classes/models/FrmForm.php +21 -1
  21. classes/models/FrmFormAction.php +4 -6
  22. classes/models/FrmNotification.php +13 -2
  23. classes/models/FrmStyle.php +2 -2
  24. classes/views/frm-entries/new.php +1 -1
  25. classes/views/frm-entries/no_entries.php +1 -1
  26. classes/views/frm-forms/add_field.php +1 -1
  27. classes/views/frm-forms/add_field_links.php +2 -1
  28. classes/views/frm-forms/mb_html_tab.php +1 -1
  29. classes/views/shared/mb_adv_info.php +1 -1
  30. classes/views/styles/show.php +1 -1
  31. classes/widgets/FrmShowForm.php +3 -17
  32. css/_single_theme.css.php +181 -64
  33. css/custom_theme.css.php +58 -60
  34. css/frm_admin.css +2 -2
  35. formidable.php +1 -1
  36. js/formidable.min.js +34 -34
  37. js/formidable_admin.js +2 -2
  38. languages/formidable-da_DK.mo +0 -0
  39. languages/formidable-da_DK.po +589 -600
  40. languages/formidable-de_DE.mo +0 -0
  41. languages/formidable-de_DE.po +587 -598
  42. languages/formidable-en_US.po +587 -598
  43. languages/formidable-es_ES.mo +0 -0
  44. languages/formidable-es_ES.po +589 -600
  45. languages/formidable-fr_FR.mo +0 -0
  46. languages/formidable-fr_FR.po +587 -598
  47. languages/formidable-it_IT.mo +0 -0
  48. languages/formidable-it_IT.po +587 -598
  49. languages/formidable-nl_NL.mo +0 -0
  50. languages/formidable-nl_NL.po +587 -598
  51. languages/formidable-pl_PL.mo +0 -0
  52. languages/formidable-pl_PL.po +587 -598
  53. languages/formidable-pt_BR.mo +0 -0
  54. languages/formidable-pt_BR.po +486 -507
classes/controllers/FrmAppController.php CHANGED
@@ -51,7 +51,7 @@ class FrmAppController {
51
 
52
  // Adds a settings link to the plugins page
53
  public static function settings_link($links) {
54
- $settings = '<a href="'. admin_url( 'admin.php?page=formidable-settings' ) .'">' . __( 'Settings', 'formidable' ) . '</a>';
55
  array_unshift( $links, $settings );
56
 
57
  return $links;
@@ -144,7 +144,6 @@ class FrmAppController {
144
 
145
  global $pagenow;
146
  if ( strpos( $page, 'formidable' ) === 0 || ( $pagenow == 'edit.php' && $post_type == 'frm_display' ) ) {
147
- add_filter( 'admin_body_class', 'FrmAppController::admin_body_class' );
148
 
149
  wp_enqueue_script( 'admin-widgets' );
150
  wp_enqueue_style( 'widgets' );
@@ -181,17 +180,6 @@ class FrmAppController {
181
  }
182
  }
183
 
184
- public static function admin_body_class( $classes ) {
185
- global $wp_version;
186
-
187
- //we only need this class on Formidable pages
188
- if ( version_compare( $wp_version, '3.4.9', '>' ) ) {
189
- $classes .= ' frm_35_trigger';
190
- }
191
-
192
- return $classes;
193
- }
194
-
195
  public static function wp_admin_body_class( $classes ) {
196
  global $wp_version;
197
  //we need this class everywhere in the admin for the menu
@@ -377,8 +365,8 @@ class FrmAppController {
377
  }
378
 
379
  $upgrade_url = add_query_arg( array( 'action' => 'frm_silent_upgrade' ), $upgrade_url );
380
- $r = wp_remote_post( $upgrade_url );
381
- if( is_wp_error( $r ) ) {
382
  // if the remove post fails, use javascript instead
383
  add_action( 'admin_notices', 'FrmAppController::install_js_fallback' );
384
  }
@@ -414,7 +402,10 @@ class FrmAppController {
414
  if ( current_user_can( 'administrator' ) ) {
415
  $frmdb = new FrmDb();
416
  $frmdb->uninstall();
417
- echo true;
 
 
 
418
  } else {
419
  $frm_settings = FrmAppHelper::get_settings();
420
  wp_die( $frm_settings->admin_permission );
51
 
52
  // Adds a settings link to the plugins page
53
  public static function settings_link($links) {
54
+ $settings = '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings' ) ) . '">' . __( 'Settings', 'formidable' ) . '</a>';
55
  array_unshift( $links, $settings );
56
 
57
  return $links;
144
 
145
  global $pagenow;
146
  if ( strpos( $page, 'formidable' ) === 0 || ( $pagenow == 'edit.php' && $post_type == 'frm_display' ) ) {
 
147
 
148
  wp_enqueue_script( 'admin-widgets' );
149
  wp_enqueue_style( 'widgets' );
180
  }
181
  }
182
 
 
 
 
 
 
 
 
 
 
 
 
183
  public static function wp_admin_body_class( $classes ) {
184
  global $wp_version;
185
  //we need this class everywhere in the admin for the menu
365
  }
366
 
367
  $upgrade_url = add_query_arg( array( 'action' => 'frm_silent_upgrade' ), $upgrade_url );
368
+ $r = wp_remote_get( esc_url_raw( $upgrade_url ) );
369
+ if ( is_wp_error( $r ) ) {
370
  // if the remove post fails, use javascript instead
371
  add_action( 'admin_notices', 'FrmAppController::install_js_fallback' );
372
  }
402
  if ( current_user_can( 'administrator' ) ) {
403
  $frmdb = new FrmDb();
404
  $frmdb->uninstall();
405
+
406
+ //disable the plugin and redirect after uninstall so the tables don't get added right back
407
+ deactivate_plugins( FrmAppHelper::plugin_folder() .'/formidable.php', false, false );
408
+ echo esc_url( admin_url('plugins.php?deactivate=true') );
409
  } else {
410
  $frm_settings = FrmAppHelper::get_settings();
411
  wp_die( $frm_settings->admin_permission );
classes/controllers/FrmEntriesController.php CHANGED
@@ -312,11 +312,11 @@ class FrmEntriesController {
312
 
313
  $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
314
  if ( $pagenum > $total_pages && $total_pages > 0 ) {
315
- $url = add_query_arg( 'paged', $total_pages );
316
  if ( headers_sent() ) {
317
  echo FrmAppHelper::js_redirect($url);
318
  } else {
319
- wp_redirect($url);
320
  }
321
  die();
322
  }
312
 
313
  $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
314
  if ( $pagenum > $total_pages && $total_pages > 0 ) {
315
+ $url = add_query_arg( 'paged', $total_pages );
316
  if ( headers_sent() ) {
317
  echo FrmAppHelper::js_redirect($url);
318
  } else {
319
+ wp_redirect( esc_url_raw( $url ) );
320
  }
321
  die();
322
  }
classes/controllers/FrmFieldsController.php CHANGED
@@ -540,7 +540,7 @@ class FrmFieldsController {
540
  $class = apply_filters('frm_field_classes', implode(' ', $class), $field);
541
 
542
  if ( ! empty($class) ) {
543
- $add_html['class'] = 'class="'. trim($class) .'"';
544
  }
545
 
546
  self::add_shortcodes_to_html($field, $add_html);
@@ -615,7 +615,7 @@ class FrmFieldsController {
615
 
616
  $size = (float) str_replace( $unit, '', $field['size'] ) / $calc[ $unit ];
617
 
618
- $add_html['cols'] = 'cols="'. (int) $size .'"';
619
  }
620
 
621
  private static function add_html_length($field, array &$add_html) {
@@ -629,7 +629,7 @@ class FrmFieldsController {
629
  return;
630
  }
631
 
632
- $add_html['maxlength'] = 'maxlength="'. $field['max'] .'"';
633
  }
634
 
635
  private static function add_html_placeholder($field, array &$add_html, array &$class) {
@@ -675,7 +675,7 @@ class FrmFieldsController {
675
  } else if ( ! empty( $k ) && isset( $add_html[ $k ] ) ) {
676
  $add_html[ $k ] = str_replace( $k .'="', $k .'="'. $v, $add_html[ $k ] );
677
  } else {
678
- $add_html[ $k ] = $k .'="'. $v .'"';
679
  }
680
 
681
  unset($k, $v);
540
  $class = apply_filters('frm_field_classes', implode(' ', $class), $field);
541
 
542
  if ( ! empty($class) ) {
543
+ $add_html['class'] = 'class="' . esc_attr( trim( $class ) ) . '"';
544
  }
545
 
546
  self::add_shortcodes_to_html($field, $add_html);
615
 
616
  $size = (float) str_replace( $unit, '', $field['size'] ) / $calc[ $unit ];
617
 
618
+ $add_html['cols'] = 'cols="' . absint( $size ) . '"';
619
  }
620
 
621
  private static function add_html_length($field, array &$add_html) {
629
  return;
630
  }
631
 
632
+ $add_html['maxlength'] = 'maxlength="' . esc_attr( $field['max'] ) . '"';
633
  }
634
 
635
  private static function add_html_placeholder($field, array &$add_html, array &$class) {
675
  } else if ( ! empty( $k ) && isset( $add_html[ $k ] ) ) {
676
  $add_html[ $k ] = str_replace( $k .'="', $k .'="'. $v, $add_html[ $k ] );
677
  } else {
678
+ $add_html[ $k ] = $k . '="' . esc_attr( $v ) . '"';
679
  }
680
 
681
  unset($k, $v);
classes/controllers/FrmFormsController.php CHANGED
@@ -6,13 +6,6 @@ class FrmFormsController {
6
  FrmHooksController::trigger_load_hook( 'load_form_hooks' );
7
  }
8
 
9
- /**
10
- * The hooks only needed when a form is loaded
11
- */
12
- public static function load_form_hooks() {
13
- add_filter('frm_form_classes', 'FrmFormsController::form_classes' );
14
- }
15
-
16
  public static function menu() {
17
  add_submenu_page('formidable', 'Formidable | '. __( 'Forms', 'formidable' ), __( 'Forms', 'formidable' ), 'frm_view_forms', 'formidable', 'FrmFormsController::route' );
18
 
@@ -397,7 +390,7 @@ class FrmFormsController {
397
 
398
  public static function insert_form_button($content) {
399
  if ( current_user_can('frm_view_forms') ) {
400
- $content .= '<a href="#TB_inline?width=50&height=50&inlineId=frm_insert_form" class="thickbox button add_media frm_insert_form" title="' . __( 'Add forms and content', 'formidable' ) . '"><span class="frm-buttons-icon wp-media-buttons-icon"></span> Formidable</a>';
401
 
402
  }
403
  return $content;
@@ -476,7 +469,7 @@ class FrmFormsController {
476
 
477
  $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
478
  if ( $pagenum > $total_pages && $total_pages > 0 ) {
479
- wp_redirect( add_query_arg( 'paged', $total_pages ) );
480
  die();
481
  }
482
 
@@ -918,7 +911,7 @@ class FrmFormsController {
918
  if ( isset($frm_vars['skip_shortcode']) && $frm_vars['skip_shortcode'] ) {
919
  $sc = '[formidable';
920
  foreach ( $atts as $k => $v ) {
921
- $sc .= ' '. $k .'="'. $v .'"';
922
  }
923
  return $sc .']';
924
  }
@@ -1056,7 +1049,7 @@ class FrmFormsController {
1056
  $class = 'frm_error_style';
1057
  }
1058
  $message = apply_filters('frm_content', $message, $form, $created);
1059
- $message = '<div class="'. $class .'">'. wpautop(do_shortcode($message)) .'</div>';
1060
  $message = apply_filters('frm_main_feedback', $message, $form, $created);
1061
 
1062
  if ( ! isset($form->options['show_form']) || $form->options['show_form'] ) {
6
  FrmHooksController::trigger_load_hook( 'load_form_hooks' );
7
  }
8
 
 
 
 
 
 
 
 
9
  public static function menu() {
10
  add_submenu_page('formidable', 'Formidable | '. __( 'Forms', 'formidable' ), __( 'Forms', 'formidable' ), 'frm_view_forms', 'formidable', 'FrmFormsController::route' );
11
 
390
 
391
  public static function insert_form_button($content) {
392
  if ( current_user_can('frm_view_forms') ) {
393
+ $content .= '<a href="#TB_inline?width=50&height=50&inlineId=frm_insert_form" class="thickbox button add_media frm_insert_form" title="' . esc_attr( __( 'Add forms and content', 'formidable' ) ) . '"><span class="frm-buttons-icon wp-media-buttons-icon"></span> Formidable</a>';
394
 
395
  }
396
  return $content;
469
 
470
  $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
471
  if ( $pagenum > $total_pages && $total_pages > 0 ) {
472
+ wp_redirect( esc_url_raw( add_query_arg( 'paged', $total_pages ) ) );
473
  die();
474
  }
475
 
911
  if ( isset($frm_vars['skip_shortcode']) && $frm_vars['skip_shortcode'] ) {
912
  $sc = '[formidable';
913
  foreach ( $atts as $k => $v ) {
914
+ $sc .= ' ' . $k . '="' . esc_attr( $v ) . '"';
915
  }
916
  return $sc .']';
917
  }
1049
  $class = 'frm_error_style';
1050
  }
1051
  $message = apply_filters('frm_content', $message, $form, $created);
1052
+ $message = '<div class="' . esc_attr( $class ) . '">' . wpautop( do_shortcode( $message ) ) . '</div>';
1053
  $message = apply_filters('frm_main_feedback', $message, $form, $created);
1054
 
1055
  if ( ! isset($form->options['show_form']) || $form->options['show_form'] ) {
classes/controllers/FrmHooksController.php CHANGED
@@ -186,6 +186,9 @@ class FrmHooksController {
186
  add_filter('frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3);
187
  add_filter('frm_field_label_seen', 'FrmFieldsController::check_label');
188
 
 
 
 
189
  // Styles Controller
190
  add_filter('frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
191
  }
186
  add_filter('frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3);
187
  add_filter('frm_field_label_seen', 'FrmFieldsController::check_label');
188
 
189
+ // Forms Controller
190
+ add_filter( 'frm_form_classes', 'FrmFormsController::form_classes' );
191
+
192
  // Styles Controller
193
  add_filter('frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
194
  }
classes/controllers/FrmStylesController.php CHANGED
@@ -99,7 +99,7 @@ class FrmStylesController {
99
  $post_id = reset($id);
100
  }
101
  // include the CSS that includes this style
102
- echo '<link href="'. admin_url('admin-ajax.php') .'?action=frmpro_css" type="text/css" rel="Stylesheet" class="frm-custom-theme" />';
103
  $message = __( 'Your styling settings have been saved.', 'formidable' );
104
  }
105
 
99
  $post_id = reset($id);
100
  }
101
  // include the CSS that includes this style
102
+ echo '<link href="' . esc_url( admin_url( 'admin-ajax.php' ) . '?action=frmpro_css' ) . '" type="text/css" rel="Stylesheet" class="frm-custom-theme" />';
103
  $message = __( 'Your styling settings have been saved.', 'formidable' );
104
  }
105
 
classes/controllers/FrmXMLController.php CHANGED
@@ -150,7 +150,7 @@ class FrmXMLController {
150
  $format = isset($_POST['format']) ? $_POST['format'] : 'xml';
151
 
152
  if ( ! headers_sent() && ! $type ) {
153
- wp_redirect(admin_url('admin.php?page=formidable-import'));
154
  die();
155
  }
156
 
@@ -273,7 +273,7 @@ class FrmXMLController {
273
  unset($tb_type);
274
  }
275
 
276
- echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . "\" ?>\n";
277
  include(FrmAppHelper::plugin_path() .'/classes/views/xml/xml.php');
278
  }
279
 
150
  $format = isset($_POST['format']) ? $_POST['format'] : 'xml';
151
 
152
  if ( ! headers_sent() && ! $type ) {
153
+ wp_redirect( esc_url_raw( admin_url( 'admin.php?page=formidable-import' ) ) );
154
  die();
155
  }
156
 
273
  unset($tb_type);
274
  }
275
 
276
+ echo '<?xml version="1.0" encoding="' . esc_attr( get_bloginfo('charset') ) . "\" ?>\n";
277
  include(FrmAppHelper::plugin_path() .'/classes/views/xml/xml.php');
278
  }
279
 
classes/helpers/FrmAppHelper.php CHANGED
@@ -4,13 +4,13 @@ if ( ! defined('ABSPATH') ) {
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.03';
14
 
15
  /**
16
  * @since 1.07.02
@@ -838,7 +838,7 @@ class FrmAppHelper {
838
  }
839
 
840
  public static function js_redirect($url) {
841
- return '<script type="text/javascript">window.location="' . $url . '"</script>';
842
  }
843
 
844
  public static function get_user_id_param($user_id) {
@@ -1029,8 +1029,6 @@ class FrmAppHelper {
1029
  if ( $field_array['custom_html'] == '' ) {
1030
  $field_array['custom_html'] = FrmFieldsHelper::get_default_html($args['field_type']);
1031
  }
1032
-
1033
- $field_array['size'] = self::get_field_size($field_array);
1034
  }
1035
 
1036
  /**
@@ -1122,18 +1120,6 @@ class FrmAppHelper {
1122
  }
1123
  }
1124
 
1125
- /**
1126
- * @since 2.0
1127
- * @return string
1128
- */
1129
- public static function get_field_size($field) {
1130
- if ( '' == $field['size'] ) {
1131
- global $frm_vars;
1132
- $field['size'] = isset($frm_vars['sidebar_width']) ? $frm_vars['sidebar_width'] : '';
1133
- }
1134
- return $field['size'];
1135
- }
1136
-
1137
  public static function insert_opt_html($args) {
1138
  $class = '';
1139
  if ( in_array( $args['type'], array( 'email', 'user_id', 'hidden', 'select', 'radio', 'checkbox', 'phone', 'text' ) ) ) {
@@ -1557,16 +1543,9 @@ class FrmAppHelper {
1557
  * @return string $post_content ( json encoded array )
1558
  */
1559
  public static function prepare_and_encode( $post_content ) {
1560
-
1561
  //Loop through array to strip slashes and add only the needed ones
1562
  foreach ( $post_content as $key => $val ) {
1563
- if ( isset( $post_content[ $key ] ) && ! is_array( $val ) ) {
1564
- // Strip all slashes so everything is the same, no matter where the value is coming from
1565
- $val = stripslashes( $val );
1566
-
1567
- // Add backslashes before double quotes and forward slashes only
1568
- $post_content[ $key ] = addcslashes( $val, '"\\/' );
1569
- }
1570
  unset( $key, $val );
1571
  }
1572
 
@@ -1582,6 +1561,49 @@ class FrmAppHelper {
1582
  return $post_content;
1583
  }
1584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1585
  public static function maybe_json_decode($string) {
1586
  if ( is_array($string) ) {
1587
  return $string;
@@ -1657,7 +1679,7 @@ class FrmAppHelper {
1657
  }
1658
 
1659
  $wp_list_table = _get_list_table('WP_Plugins_List_Table');
1660
- echo '<tr class="plugin-update-tr active"><th colspan="' . $wp_list_table->get_column_count() . '" class="check-column plugin-update colspanchange"><div class="update-message">'.
1661
  __( 'You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable.', 'formidable' ) .
1662
  '</div></td></tr>';
1663
  }
4
  }
5
 
6
  class FrmAppHelper {
7
+ public static $db_version = 25; //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.04';
14
 
15
  /**
16
  * @since 1.07.02
838
  }
839
 
840
  public static function js_redirect($url) {
841
+ return '<script type="text/javascript">window.location="' . esc_url_raw( $url ) . '"</script>';
842
  }
843
 
844
  public static function get_user_id_param($user_id) {
1029
  if ( $field_array['custom_html'] == '' ) {
1030
  $field_array['custom_html'] = FrmFieldsHelper::get_default_html($args['field_type']);
1031
  }
 
 
1032
  }
1033
 
1034
  /**
1120
  }
1121
  }
1122
 
 
 
 
 
 
 
 
 
 
 
 
 
1123
  public static function insert_opt_html($args) {
1124
  $class = '';
1125
  if ( in_array( $args['type'], array( 'email', 'user_id', 'hidden', 'select', 'radio', 'checkbox', 'phone', 'text' ) ) ) {
1543
  * @return string $post_content ( json encoded array )
1544
  */
1545
  public static function prepare_and_encode( $post_content ) {
 
1546
  //Loop through array to strip slashes and add only the needed ones
1547
  foreach ( $post_content as $key => $val ) {
1548
+ self::prepare_action_slashes( $val, $key, $post_content );
 
 
 
 
 
 
1549
  unset( $key, $val );
1550
  }
1551
 
1561
  return $post_content;
1562
  }
1563
 
1564
+ private static function prepare_action_slashes( $val, $key, &$post_content ) {
1565
+ if ( ! isset( $post_content[ $key ] ) ) {
1566
+ return;
1567
+ }
1568
+
1569
+ if ( is_array( $val ) ) {
1570
+ foreach ( $val as $k1 => $v1 ) {
1571
+ self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] );
1572
+ unset( $k1, $v1 );
1573
+ }
1574
+ } else {
1575
+ // Strip all slashes so everything is the same, no matter where the value is coming from
1576
+ $val = stripslashes( $val );
1577
+
1578
+ // Add backslashes before double quotes and forward slashes only
1579
+ $post_content[ $key ] = addcslashes( $val, '"\\/' );
1580
+ }
1581
+ }
1582
+
1583
+ /**
1584
+ * Since actions are JSON encoded, we don't want any filters messing with it.
1585
+ * Remove the filters and then add them back in case any posts or views are
1586
+ * also being imported.
1587
+ *
1588
+ * Used when saving form actions and styles
1589
+ *
1590
+ * @since 2.0.4
1591
+ */
1592
+ public static function save_json_post( $settings ) {
1593
+ global $wp_filter;
1594
+ $filters = $wp_filter['content_save_pre'];
1595
+
1596
+ // Remove the balanceTags filter in case WordPress is trying to validate the XHTML
1597
+ remove_all_filters( 'content_save_pre' );
1598
+
1599
+ $post = wp_insert_post( $settings );
1600
+
1601
+ // add the content filters back for views or posts
1602
+ $wp_filter['content_save_pre'] = $filters;
1603
+
1604
+ return $post;
1605
+ }
1606
+
1607
  public static function maybe_json_decode($string) {
1608
  if ( is_array($string) ) {
1609
  return $string;
1679
  }
1680
 
1681
  $wp_list_table = _get_list_table('WP_Plugins_List_Table');
1682
+ echo '<tr class="plugin-update-tr active"><th colspan="' . absint( $wp_list_table->get_column_count() ) . '" class="check-column plugin-update colspanchange"><div class="update-message">' .
1683
  __( 'You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable.', 'formidable' ) .
1684
  '</div></td></tr>';
1685
  }
classes/helpers/FrmEntriesHelper.php CHANGED
@@ -72,8 +72,6 @@ class FrmEntriesHelper {
72
 
73
  unset($opt_defaults);
74
 
75
- $field_array['size'] = FrmAppHelper::get_field_size($field_array);
76
-
77
  if ( $field_array['custom_html'] == '' ) {
78
  $field_array['custom_html'] = FrmFieldsHelper::get_default_html($field->type);
79
  }
72
 
73
  unset($opt_defaults);
74
 
 
 
75
  if ( $field_array['custom_html'] == '' ) {
76
  $field_array['custom_html'] = FrmFieldsHelper::get_default_html($field->type);
77
  }
classes/helpers/FrmEntriesListHelper.php CHANGED
@@ -25,7 +25,7 @@ class FrmEntriesListHelper extends FrmListHelper {
25
  $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : '';
26
 
27
  if ( $s != '' && FrmAppHelper::pro_is_installed() ) {
28
- $fid = isset( $_REQUEST['fid'] ) ? sanitize_text_field( $_REQUEST['fid'] ) : '';
29
  $s_query = FrmProEntriesHelper::get_search_str( $s_query, $s, $form_id, $fid);
30
  }
31
 
@@ -124,7 +124,7 @@ class FrmEntriesListHelper extends FrmListHelper {
124
  } else {
125
  submit_button( $text, 'button', false, false, array( 'id' => 'search-submit') );
126
  if ( ! empty( $search_str ) ) { ?>
127
- <a href="<?php echo admin_url('admin.php?page=formidable-entries&frm_action=list&form='.$form->id) ?>"><?php _e( 'Reset', 'formidable' ) ?></a>
128
  <?php
129
  }
130
  } ?>
@@ -159,7 +159,7 @@ class FrmEntriesListHelper extends FrmListHelper {
159
  $action_col = $column_name;
160
  }
161
 
162
- $attributes = 'class="'. $class .'"';
163
  unset($class);
164
 
165
  $col_name = preg_replace('/^('. $this->params['form'] .'_)/', '', $column_name);
@@ -180,7 +180,7 @@ class FrmEntriesListHelper extends FrmListHelper {
180
  case 'created_at':
181
  case 'updated_at':
182
  $date = FrmAppHelper::get_formatted_time($item->{$col_name});
183
- $val = '<abbr title="' . FrmAppHelper::get_formatted_time( $item->{$col_name}, '', 'g:i:s A' ) . '">' . $date . '</abbr>';
184
  break;
185
  case 'is_draft':
186
  $val = empty($item->is_draft) ? __( 'No') : __( 'Yes');
@@ -233,7 +233,7 @@ class FrmEntriesListHelper extends FrmListHelper {
233
  $r .= "<td $attributes>";
234
  if ( $column_name == $action_col ) {
235
  $edit_link = '?page=formidable-entries&frm_action=edit&id='. $item->id;
236
- $r .= '<a href="'. (isset($actions['edit']) ? $edit_link : $view_link) .'" class="row-title" >'. $val .'</a> ';
237
  $r .= $action_links;
238
  } else {
239
  $r .= $val;
@@ -255,7 +255,7 @@ class FrmEntriesListHelper extends FrmListHelper {
255
 
256
  if ( current_user_can('frm_delete_entries') ) {
257
  $delete_link = '?page=formidable-entries&frm_action=destroy&id='. $item->id .'&form='. $this->params['form'];
258
- $actions['delete'] = '<a href="' . wp_nonce_url( $delete_link ) . '" class="submitdelete" onclick="return confirm(\''. __( 'Are you sure you want to delete that?', 'formidable' ) .'\')">' . __( 'Delete' ) . '</a>';
259
  }
260
 
261
  $actions = apply_filters('frm_row_actions', $actions, $item);
25
  $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : '';
26
 
27
  if ( $s != '' && FrmAppHelper::pro_is_installed() ) {
28
+ $fid = isset( $_REQUEST['fid'] ) ? absint( $_REQUEST['fid'] ) : '';
29
  $s_query = FrmProEntriesHelper::get_search_str( $s_query, $s, $form_id, $fid);
30
  }
31
 
124
  } else {
125
  submit_button( $text, 'button', false, false, array( 'id' => 'search-submit') );
126
  if ( ! empty( $search_str ) ) { ?>
127
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=list&form=' . $form->id ) ) ?>"><?php _e( 'Reset', 'formidable' ) ?></a>
128
  <?php
129
  }
130
  } ?>
159
  $action_col = $column_name;
160
  }
161
 
162
+ $attributes = 'class="' . esc_attr( $class ) . '"';
163
  unset($class);
164
 
165
  $col_name = preg_replace('/^('. $this->params['form'] .'_)/', '', $column_name);
180
  case 'created_at':
181
  case 'updated_at':
182
  $date = FrmAppHelper::get_formatted_time($item->{$col_name});
183
+ $val = '<abbr title="' . esc_attr( FrmAppHelper::get_formatted_time( $item->{$col_name}, '', 'g:i:s A' ) ) . '">' . $date . '</abbr>';
184
  break;
185
  case 'is_draft':
186
  $val = empty($item->is_draft) ? __( 'No') : __( 'Yes');
233
  $r .= "<td $attributes>";
234
  if ( $column_name == $action_col ) {
235
  $edit_link = '?page=formidable-entries&frm_action=edit&id='. $item->id;
236
+ $r .= '<a href="' . esc_url( isset( $actions['edit'] ) ? $edit_link : $view_link ) . '" class="row-title" >' . $val . '</a> ';
237
  $r .= $action_links;
238
  } else {
239
  $r .= $val;
255
 
256
  if ( current_user_can('frm_delete_entries') ) {
257
  $delete_link = '?page=formidable-entries&frm_action=destroy&id='. $item->id .'&form='. $this->params['form'];
258
+ $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( $delete_link ) ) . '" class="submitdelete" onclick="return confirm(\'' . esc_attr( __( 'Are you sure you want to delete that?', 'formidable' ) ) . '\')">' . __( 'Delete' ) . '</a>';
259
  }
260
 
261
  $actions = apply_filters('frm_row_actions', $actions, $item);
classes/helpers/FrmFieldsHelper.php CHANGED
@@ -475,6 +475,11 @@ DEFAULT_HTML;
475
  $error_class .= ' frm_other_container';
476
  }
477
 
 
 
 
 
 
478
  // If this is a Section
479
  if ( $field['type'] == 'divider' ) {
480
 
@@ -634,7 +639,7 @@ DEFAULT_HTML;
634
  $add_html .= FrmProFieldsController::input_html($args['field'], false);
635
  }
636
 
637
- $dropdown = str_replace("<select name='". $args['name'] ."' id='$id' class='$class'", "<select name='". $args['name'] ."' id='$id' ". $add_html, $dropdown);
638
 
639
  if ( is_array($args['field']['value']) ) {
640
  $skip = true;
@@ -643,7 +648,7 @@ DEFAULT_HTML;
643
  $skip = false;
644
  continue;
645
  }
646
- $dropdown = str_replace(' value="'. $v. '"', ' value="'. $v .'" selected="selected"', $dropdown);
647
  unset($v);
648
  }
649
  }
475
  $error_class .= ' frm_other_container';
476
  }
477
 
478
+ // Add class to Dynamic fields
479
+ if ( $field['type'] == 'data' ) {
480
+ $error_class .= ' frm_dynamic_' . $field['data_type'] . '_container';
481
+ }
482
+
483
  // If this is a Section
484
  if ( $field['type'] == 'divider' ) {
485
 
639
  $add_html .= FrmProFieldsController::input_html($args['field'], false);
640
  }
641
 
642
+ $dropdown = str_replace( "<select name='" . esc_attr( $args['name'] ) ."' id='" . esc_attr( $id ) . "' class='" . esc_attr( $class ) . "'", "<select name='" . esc_attr( $args['name'] ) . "' id='" . esc_attr( $id ) . "' " . $add_html, $dropdown );
643
 
644
  if ( is_array($args['field']['value']) ) {
645
  $skip = true;
648
  $skip = false;
649
  continue;
650
  }
651
+ $dropdown = str_replace(' value="' . esc_attr( $v ) . '"', ' value="' . esc_attr( $v ) . '" selected="selected"', $dropdown );
652
  unset($v);
653
  }
654
  }
classes/helpers/FrmFormActionsHelper.php CHANGED
@@ -16,18 +16,7 @@ class FrmFormActionsHelper {
16
  return $action_controls->get_all( $form_id, $limit );
17
  }
18
 
19
- $args = array(
20
- 'post_type' => FrmFormActionsController::$action_post_type,
21
- 'post_status' => 'publish',
22
- 'numberposts' => 99,
23
- 'orderby' => 'title',
24
- 'order' => 'ASC',
25
- );
26
-
27
- if ( $form_id ) {
28
- $args['menu_order'] = $form_id;
29
- }
30
-
31
  $actions = FrmAppHelper::check_cache( serialize( $args ), 'frm_actions', $args, 'get_posts' );
32
 
33
  if ( ! $actions ) {
@@ -52,6 +41,32 @@ class FrmFormActionsHelper {
52
  return $settings;
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  public static function action_conditions_met($action, $entry) {
56
  $notification = $action->post_content;
57
  $stop = false;
16
  return $action_controls->get_all( $form_id, $limit );
17
  }
18
 
19
+ $args = self::action_args( $form_id );
 
 
 
 
 
 
 
 
 
 
 
20
  $actions = FrmAppHelper::check_cache( serialize( $args ), 'frm_actions', $args, 'get_posts' );
21
 
22
  if ( ! $actions ) {
41
  return $settings;
42
  }
43
 
44
+ public static function action_args( $form_id = 0 ) {
45
+ $args = array(
46
+ 'post_type' => FrmFormActionsController::$action_post_type,
47
+ 'post_status' => 'publish',
48
+ 'numberposts' => 99,
49
+ 'orderby' => 'title',
50
+ 'order' => 'ASC',
51
+ );
52
+
53
+ if ( $form_id ) {
54
+ $args['menu_order'] = $form_id;
55
+ }
56
+
57
+ return $args;
58
+ }
59
+
60
+ /**
61
+ * Delete the action cache when a form action is created, deleted, or updated
62
+ *
63
+ * @since 2.0.4
64
+ */
65
+ public static function clear_action_cache( $form_id ) {
66
+ $args = self::action_args( $form_id );
67
+ wp_cache_delete( serialize( $args ), 'frm_actions' );
68
+ }
69
+
70
  public static function action_conditions_met($action, $entry) {
71
  $notification = $action->post_content;
72
  $stop = false;
classes/helpers/FrmFormsHelper.php CHANGED
@@ -96,7 +96,7 @@ class FrmFormsHelper {
96
  $args['form'] = $form->id;
97
  }
98
  ?>
99
- <li><a href="<?php echo isset($base) ? add_query_arg($args, $base) : add_query_arg($args); ?>" tabindex="-1"><?php echo empty($form->name) ? __( '(no title)') : FrmAppHelper::truncate($form->name, 33); ?></a></li>
100
  <?php
101
  unset( $form );
102
  } ?>
@@ -261,7 +261,7 @@ BEFORE_HTML;
261
 
262
  $classes = apply_filters('frm_submit_button_class', array(), $form);
263
  if ( ! empty($classes) ) {
264
- echo ' class="'. implode(' ', $classes) .'"';
265
  }
266
 
267
  do_action('frm_submit_button_action', $form, $form_action);
@@ -483,7 +483,7 @@ BEFORE_HTML;
483
  }
484
 
485
  if ( $form_id ) {
486
- $val = '<a href="'. admin_url('admin.php') .'?page=formidable&frm_action=edit&id='. $form_id .'">'. ( '' == $name ? __( '(no title)') : FrmAppHelper::truncate($name, 40) ) .'</a>';
487
  } else {
488
  $val = '';
489
  }
@@ -511,12 +511,12 @@ BEFORE_HTML;
511
  $current_page = isset( $_REQUEST['form_type'] ) ? $_REQUEST['form_type'] : '';
512
  $base_url = '?page=formidable&form_type='. $current_page .'&id='. $id;
513
  if ( 'trash' == $status ) {
514
- $link = '<a href="'. esc_url(wp_nonce_url( $base_url .'&frm_action=untrash', 'untrash_form_' . $id )) .'" class="submitdelete deletion">'. $labels['restore'][$length] .'</a>';
515
  } else if ( current_user_can('frm_delete_forms') ) {
516
  if ( EMPTY_TRASH_DAYS ) {
517
- $link = '<a href="'. wp_nonce_url( $base_url .'&frm_action=trash', 'trash_form_' . $id ) .'" class="submitdelete deletion">'. $labels['trash'][$length] .'</a>';
518
  } else {
519
- $link = '<a href="'. wp_nonce_url( $base_url .'&frm_action=destroy', 'destroy_form_' . $id ) .'" class="submitdelete deletion" onclick="return confirm(\''. __( 'Are you sure you want to delete this form and all its entries?', 'formidable' ) .'\')">'. $labels['delete'][$length] .'</a>';
520
  }
521
  }
522
 
@@ -580,7 +580,7 @@ BEFORE_HTML;
580
  }
581
 
582
  $available_status['untrash']['message'] = sprintf(_n( '%1$s form restored from the Trash.', '%1$s forms restored from the Trash.', $count, 'formidable' ), $count );
583
- $available_status['trash']['message'] = sprintf(_n( '%1$s form moved to the Trash. %2$sUndo%3$s', '%1$s forms moved to the Trash. %2$sUndo%3$s', $count, 'formidable' ), $count, '<a href="'. esc_url(wp_nonce_url( '?page=formidable&frm_action=untrash&form_type='. ( isset( $_REQUEST['form_type'] ) ? $_REQUEST['form_type'] : '' ) .'&id='. $params['id'], 'untrash_form_' . $params['id'] )) .'">', '</a>' );
584
 
585
  $message = $available_status[$status]['message'];
586
 
96
  $args['form'] = $form->id;
97
  }
98
  ?>
99
+ <li><a href="<?php echo esc_url( isset( $base ) ? add_query_arg( $args, $base ) : add_query_arg( $args ) ); ?>" tabindex="-1"><?php echo empty( $form->name ) ? __( '(no title)') : FrmAppHelper::truncate( $form->name, 33 ); ?></a></li>
100
  <?php
101
  unset( $form );
102
  } ?>
261
 
262
  $classes = apply_filters('frm_submit_button_class', array(), $form);
263
  if ( ! empty($classes) ) {
264
+ echo ' class="' . esc_attr( implode( ' ', $classes ) ) . '"';
265
  }
266
 
267
  do_action('frm_submit_button_action', $form, $form_action);
483
  }
484
 
485
  if ( $form_id ) {
486
+ $val = '<a href="' . esc_url( admin_url( 'admin.php' ) . '?page=formidable&frm_action=edit&id=' . $form_id ) . '">' . ( '' == $name ? __( '(no title)' ) : FrmAppHelper::truncate( $name, 40 ) ) . '</a>';
487
  } else {
488
  $val = '';
489
  }
511
  $current_page = isset( $_REQUEST['form_type'] ) ? $_REQUEST['form_type'] : '';
512
  $base_url = '?page=formidable&form_type='. $current_page .'&id='. $id;
513
  if ( 'trash' == $status ) {
514
+ $link = '<a href="'. esc_url( wp_nonce_url( $base_url . '&frm_action=untrash', 'untrash_form_' . $id ) ) . '" class="submitdelete deletion">' . $labels['restore'][ $length ] . '</a>';
515
  } else if ( current_user_can('frm_delete_forms') ) {
516
  if ( EMPTY_TRASH_DAYS ) {
517
+ $link = '<a href="' . esc_url( wp_nonce_url( $base_url . '&frm_action=trash', 'trash_form_' . $id ) ) . '" class="submitdelete deletion">' . $labels['trash'][ $length ] . '</a>';
518
  } else {
519
+ $link = '<a href="' . esc_url( wp_nonce_url( $base_url .'&frm_action=destroy', 'destroy_form_' . $id ) ) . '" class="submitdelete deletion" onclick="return confirm(\'' . esc_attr( __( 'Are you sure you want to delete this form and all its entries?', 'formidable' ) ) . '\')">' . $labels['delete'][ $length ] . '</a>';
520
  }
521
  }
522
 
580
  }
581
 
582
  $available_status['untrash']['message'] = sprintf(_n( '%1$s form restored from the Trash.', '%1$s forms restored from the Trash.', $count, 'formidable' ), $count );
583
+ $available_status['trash']['message'] = sprintf( _n( '%1$s form moved to the Trash. %2$sUndo%3$s', '%1$s forms moved to the Trash. %2$sUndo%3$s', $count, 'formidable' ), $count, '<a href="' . esc_url( wp_nonce_url( '?page=formidable&frm_action=untrash&form_type='. ( isset( $_REQUEST['form_type'] ) ? sanitize_title( $_REQUEST['form_type'] ) : '' ) . '&id=' . $params['id'], 'untrash_form_' . $params['id'] ) ) . '">', '</a>' );
584
 
585
  $message = $available_status[$status]['message'];
586
 
classes/helpers/FrmFormsListHelper.php CHANGED
@@ -146,7 +146,7 @@ class FrmFormsListHelper extends FrmListHelper {
146
  } else {
147
  foreach ( $forms as $form ) {
148
  $args['id'] = $form->id; ?>
149
- <li><a href="<?php echo add_query_arg($args, $base); ?>" tabindex="-1"><?php echo empty($form->name) ? __( '(no title)') : FrmAppHelper::truncate($form->name, 33); ?></a></li>
150
  <?php
151
  unset($form);
152
  }
@@ -212,9 +212,9 @@ class FrmFormsListHelper extends FrmListHelper {
212
  $action_links = $this->row_actions( $actions );
213
 
214
  // Set up the checkbox ( because the user is editable, otherwise its empty )
215
- $checkbox = '<input type="checkbox" name="item-action[]" id="cb-item-action-'. $item->id .'" value="'. $item->id .'" />';
216
 
217
- $r = '<tr id="item-action-'. $item->id .'"'. $style .'>';
218
 
219
  list( $columns, $hidden ) = $this->get_column_info();
220
 
@@ -231,7 +231,7 @@ class FrmFormsListHelper extends FrmListHelper {
231
  $class .= ' frm_hidden';
232
  }
233
 
234
- $class = 'class="' . $class . '"';
235
  $attributes = $class . $style;
236
 
237
  switch ( $column_name ) {
@@ -249,7 +249,7 @@ class FrmFormsListHelper extends FrmListHelper {
249
  break;
250
  case 'created_at':
251
  $date = date($format, strtotime($item->created_at));
252
- $val = '<abbr title="'. date('Y/m/d g:i:s A', strtotime($item->created_at)) .'">'. $date .'</abbr>';
253
  break;
254
  case 'shortcode':
255
  $val = '<input type="text" readonly="true" class="frm_select_box" value="'. esc_attr("[formidable id={$item->id}]") .'" /><br/>';
@@ -305,12 +305,12 @@ class FrmFormsListHelper extends FrmListHelper {
305
  }
306
 
307
  if ( $item->is_template ) {
308
- $actions['frm_duplicate'] = '<a href="'. wp_nonce_url( $duplicate_link ) .'">'. __( 'Create Form from Template', 'formidable' ) .'</a>';
309
  } else {
310
  $actions['frm_settings'] = '<a href="'. esc_url('?page=formidable&frm_action=settings&id='. $item->id ) . '">'. __( 'Settings', 'formidable' ) .'</a>';
311
 
312
  if ( FrmAppHelper::pro_is_installed() ) {
313
- $actions['duplicate'] = '<a href="' . wp_nonce_url( $duplicate_link ) . '">'. __( 'Duplicate', 'formidable' ) .'</a>';
314
  }
315
  }
316
  }
@@ -321,7 +321,7 @@ class FrmFormsListHelper extends FrmListHelper {
321
  unset( $actions['trash'] );
322
  }
323
 
324
- $actions['view'] = '<a href="'. FrmFormsHelper::get_direct_link($item->form_key, $item) .'" target="_blank">'. __( 'Preview') .'</a>';
325
  }
326
 
327
  /**
@@ -338,7 +338,7 @@ class FrmFormsListHelper extends FrmListHelper {
338
  if ( 'trash' == $this->status ) {
339
  $val .= $form_name;
340
  } else {
341
- $val .= '<a href="'. ( isset($actions['frm_edit']) ? $edit_link : FrmFormsHelper::get_direct_link($item->form_key, $item) ) .'" class="row-title">'. $form_name .'</a> ';
342
  }
343
 
344
  $this->add_draft_label( $item, $val );
146
  } else {
147
  foreach ( $forms as $form ) {
148
  $args['id'] = $form->id; ?>
149
+ <li><a href="<?php echo esc_url( add_query_arg( $args, $base ) ); ?>" tabindex="-1"><?php echo empty( $form->name ) ? __( '(no title)' ) : FrmAppHelper::truncate( $form->name, 33 ); ?></a></li>
150
  <?php
151
  unset($form);
152
  }
212
  $action_links = $this->row_actions( $actions );
213
 
214
  // Set up the checkbox ( because the user is editable, otherwise its empty )
215
+ $checkbox = '<input type="checkbox" name="item-action[]" id="cb-item-action-' . absint( $item->id ) . '" value="' . esc_attr( $item->id ) . '" />';
216
 
217
+ $r = '<tr id="item-action-' . absint( $item->id ) . '"' . $style . '>';
218
 
219
  list( $columns, $hidden ) = $this->get_column_info();
220
 
231
  $class .= ' frm_hidden';
232
  }
233
 
234
+ $class = 'class="' . esc_attr( $class ) . '"';
235
  $attributes = $class . $style;
236
 
237
  switch ( $column_name ) {
249
  break;
250
  case 'created_at':
251
  $date = date($format, strtotime($item->created_at));
252
+ $val = '<abbr title="' . esc_attr( date( 'Y/m/d g:i:s A', strtotime( $item->created_at ) ) ) . '">' . $date . '</abbr>';
253
  break;
254
  case 'shortcode':
255
  $val = '<input type="text" readonly="true" class="frm_select_box" value="'. esc_attr("[formidable id={$item->id}]") .'" /><br/>';
305
  }
306
 
307
  if ( $item->is_template ) {
308
+ $actions['frm_duplicate'] = '<a href="'. esc_url( wp_nonce_url( $duplicate_link ) ) . '">' . __( 'Create Form from Template', 'formidable' ) . '</a>';
309
  } else {
310
  $actions['frm_settings'] = '<a href="'. esc_url('?page=formidable&frm_action=settings&id='. $item->id ) . '">'. __( 'Settings', 'formidable' ) .'</a>';
311
 
312
  if ( FrmAppHelper::pro_is_installed() ) {
313
+ $actions['duplicate'] = '<a href="' . esc_url( wp_nonce_url( $duplicate_link ) ) . '">' . __( 'Duplicate', 'formidable' ) . '</a>';
314
  }
315
  }
316
  }
321
  unset( $actions['trash'] );
322
  }
323
 
324
+ $actions['view'] = '<a href="' . esc_url( FrmFormsHelper::get_direct_link( $item->form_key, $item ) ) . '" target="_blank">' . __( 'Preview') . '</a>';
325
  }
326
 
327
  /**
338
  if ( 'trash' == $this->status ) {
339
  $val .= $form_name;
340
  } else {
341
+ $val .= '<a href="' . esc_url( isset( $actions['frm_edit'] ) ? $edit_link : FrmFormsHelper::get_direct_link( $item->form_key, $item ) ) . '" class="row-title">' . FrmAppHelper::kses( $form_name ) . '</a> ';
342
  }
343
 
344
  $this->add_draft_label( $item, $val );
classes/helpers/FrmStylesHelper.php CHANGED
@@ -74,9 +74,9 @@ class FrmStylesHelper {
74
  public static function style_menu($active = '') {
75
  ?>
76
  <h2 class="nav-tab-wrapper">
77
- <a href="<?php echo admin_url('admin.php?page=formidable-styles') ?>" class="nav-tab <?php echo ( '' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Edit Styles', 'formidable' ) ?></a>
78
- <a href="<?php echo admin_url('admin.php?page=formidable-styles&frm_action=manage') ?>" class="nav-tab <?php echo ( 'manage' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Manage Form Styles', 'formidable' ) ?></a>
79
- <a href="<?php echo admin_url('admin.php?page=formidable-styles&frm_action=custom_css') ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a>
80
  </h2>
81
  <?php
82
  }
74
  public static function style_menu($active = '') {
75
  ?>
76
  <h2 class="nav-tab-wrapper">
77
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles' ) ) ?>" class="nav-tab <?php echo ( '' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Edit Styles', 'formidable' ) ?></a>
78
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=manage' ) ) ?>" class="nav-tab <?php echo ( 'manage' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Manage Form Styles', 'formidable' ) ?></a>
79
+ <a href="<?php echo esc_url( admin_url('admin.php?page=formidable-styles&frm_action=custom_css' ) ) ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a>
80
  </h2>
81
  <?php
82
  }
classes/helpers/FrmXMLHelper.php CHANGED
@@ -657,11 +657,8 @@ class FrmXMLHelper {
657
  ) );
658
 
659
  if ( ! $exists ) {
660
- // Remove the balanceTags filter in case WordPress is trying to validate the XHTML
661
- remove_filter( 'content_save_pre', 'balanceTags', 50 );
662
- remove_filter( 'content_save_pre', 'wp_filter_post_kses' );
663
-
664
- wp_insert_post( $new_action );
665
  $imported['imported']['actions']++;
666
  }
667
  }
@@ -707,7 +704,7 @@ class FrmXMLHelper {
707
 
708
  private static function migrate_email_settings_to_action( $form_options, $form_id, $post_type, &$imported, $switch ) {
709
  // No old notifications or autoresponders to carry over
710
- if ( ! isset( $form_options['auto_responder'] ) && ! isset( $form_options['notification'] ) ) {
711
  return;
712
  }
713
 
@@ -750,10 +747,7 @@ class FrmXMLHelper {
750
  ) );
751
 
752
  if ( empty($exists) ) {
753
- // Remove the balancTags filter in case WordPress is trying to validate the XHTML
754
- remove_filter( 'content_save_pre', 'balanceTags', 50 );
755
-
756
- wp_insert_post( $new_notification );
757
  $imported['imported']['actions']++;
758
  }
759
  unset($new_notification);
@@ -870,8 +864,8 @@ class FrmXMLHelper {
870
  unset( $add_field );
871
  }
872
 
873
- // Set reply to
874
- $new_notification['post_content']['reply_to'] = $atts['reply_to'];
875
 
876
  // Set from
877
  if ( !empty( $atts['reply_to'] ) || !empty( $atts['reply_to_name'] ) ) {
657
  ) );
658
 
659
  if ( ! $exists ) {
660
+ // this isn't an email, but we need to use a class that will always be included
661
+ FrmAppHelper::save_json_post( $new_action );
 
 
 
662
  $imported['imported']['actions']++;
663
  }
664
  }
704
 
705
  private static function migrate_email_settings_to_action( $form_options, $form_id, $post_type, &$imported, $switch ) {
706
  // No old notifications or autoresponders to carry over
707
+ if ( ! isset( $form_options['auto_responder'] ) && ! isset( $form_options['notification'] ) && ! isset( $form_options['email_to'] ) ) {
708
  return;
709
  }
710
 
747
  ) );
748
 
749
  if ( empty($exists) ) {
750
+ FrmAppHelper::save_json_post( $new_notification );
 
 
 
751
  $imported['imported']['actions']++;
752
  }
753
  unset($new_notification);
864
  unset( $add_field );
865
  }
866
 
867
+ // Set reply to
868
+ $new_notification['post_content']['reply_to'] = $atts['reply_to'];
869
 
870
  // Set from
871
  if ( !empty( $atts['reply_to'] ) || !empty( $atts['reply_to_name'] ) ) {
classes/models/FrmDb.php CHANGED
@@ -156,7 +156,7 @@ class FrmDb {
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,6 +492,29 @@ class FrmDb {
492
  return true;
493
  }
494
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  /**
496
  * Check if the parent_form_id columns exists.
497
  * If not, try and add it again
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, 25 );
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
+ * Migrate old styling settings. If sites are using the old
497
+ * default 400px field width, switch it to 100%
498
+ *
499
+ * @since 2.0.4
500
+ */
501
+ private function migrate_to_25() {
502
+ // get the style that was created with the style migration
503
+ $frm_style = new FrmStyle();
504
+ $styles = $frm_style->get_all( 'post_date', 'ASC', 1 );
505
+ if ( empty( $styles ) ) {
506
+ return;
507
+ }
508
+
509
+ foreach ( $styles as $style ) {
510
+ if ( $style->post_content['field_width'] == '400px' ) {
511
+ $style->post_content['field_width'] = '100%';
512
+ $frm_style->save( (array) $style );
513
+ return;
514
+ }
515
+ }
516
+ }
517
+
518
  /**
519
  * Check if the parent_form_id columns exists.
520
  * If not, try and add it again
classes/models/FrmEntry.php CHANGED
@@ -606,6 +606,12 @@ class FrmEntry {
606
  return;
607
  }
608
 
 
 
 
 
 
 
609
  if ( ! isset($_POST['g-recaptcha-response']) ) {
610
  // If captcha is missing, check if it was already verified
611
  if ( ! isset( $_POST['recaptcha_checked'] ) || ! wp_verify_nonce( $_POST['recaptcha_checked'], 'frm_ajax' ) ) {
@@ -615,12 +621,17 @@ class FrmEntry {
615
  return;
616
  }
617
 
618
- $frm_settings = FrmAppHelper::get_settings();
619
-
620
- $resp = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify?secret='. $frm_settings->privkey .'&response='. $_POST['g-recaptcha-response'] .'&remoteip='. FrmAppHelper::get_ip_address() );
 
 
 
 
 
621
  $response = json_decode(wp_remote_retrieve_body( $resp ), true);
622
 
623
- if ( ! $response['success'] ) {
624
  // What happens when the CAPTCHA was entered incorrectly
625
  $errors['field'. $args['id']] = ( ! isset($field->field_options['invalid']) || $field->field_options['invalid'] == '' ) ? $frm_settings->re_msg : $field->field_options['invalid'];
626
  }
606
  return;
607
  }
608
 
609
+ $frm_settings = FrmAppHelper::get_settings();
610
+ if ( empty( $frm_settings->pubkey ) ) {
611
+ // don't require the captcha if it shouldn't be shown
612
+ return;
613
+ }
614
+
615
  if ( ! isset($_POST['g-recaptcha-response']) ) {
616
  // If captcha is missing, check if it was already verified
617
  if ( ! isset( $_POST['recaptcha_checked'] ) || ! wp_verify_nonce( $_POST['recaptcha_checked'], 'frm_ajax' ) ) {
621
  return;
622
  }
623
 
624
+ $arg_array = array(
625
+ 'body' => array(
626
+ 'secret' => $frm_settings->privkey,
627
+ 'response' => $_POST['g-recaptcha-response'],
628
+ 'remoteip' => FrmAppHelper::get_ip_address(),
629
+ ),
630
+ );
631
+ $resp = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', $arg_array );
632
  $response = json_decode(wp_remote_retrieve_body( $resp ), true);
633
 
634
+ if ( isset( $response['success'] ) && ! $response['success'] ) {
635
  // What happens when the CAPTCHA was entered incorrectly
636
  $errors['field'. $args['id']] = ( ! isset($field->field_options['invalid']) || $field->field_options['invalid'] == '' ) ? $frm_settings->re_msg : $field->field_options['invalid'];
637
  }
classes/models/FrmField.php CHANGED
@@ -465,7 +465,7 @@ class FrmField{
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
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
classes/models/FrmForm.php CHANGED
@@ -45,6 +45,10 @@ class FrmForm{
45
  $wpdb->insert( $wpdb->prefix .'frm_forms', $new_values );
46
 
47
  $id = $wpdb->insert_id;
 
 
 
 
48
  return $id;
49
  }
50
 
@@ -89,6 +93,9 @@ class FrmForm{
89
  $query_results = $wpdb->insert( $wpdb->prefix .'frm_forms', $new_values );
90
 
91
  if ( $query_results ) {
 
 
 
92
  $form_id = $wpdb->insert_id;
93
  FrmField::duplicate($id, $form_id, $copy_keys, $blog_id);
94
 
@@ -333,7 +340,7 @@ class FrmForm{
333
  );
334
 
335
  if ( $query_results ) {
336
- wp_cache_delete( $id, 'frm_form');
337
  }
338
 
339
  return $query_results;
@@ -366,6 +373,9 @@ class FrmForm{
366
  $action_control = FrmFormActionsController::get_form_actions( 'email' );
367
  $action_control->destroy($id, 'all');
368
 
 
 
 
369
  do_action('frm_destroy_form', $id);
370
  do_action('frm_destroy_form_'. $id);
371
  }
@@ -553,6 +563,16 @@ class FrmForm{
553
  return $counts;
554
  }
555
 
 
 
 
 
 
 
 
 
 
 
556
  /**
557
  * @return array of errors
558
  */
45
  $wpdb->insert( $wpdb->prefix .'frm_forms', $new_values );
46
 
47
  $id = $wpdb->insert_id;
48
+
49
+ // Clear form caching
50
+ self::clear_form_cache();
51
+
52
  return $id;
53
  }
54
 
93
  $query_results = $wpdb->insert( $wpdb->prefix .'frm_forms', $new_values );
94
 
95
  if ( $query_results ) {
96
+ // Clear form caching
97
+ self::clear_form_cache();
98
+
99
  $form_id = $wpdb->insert_id;
100
  FrmField::duplicate($id, $form_id, $copy_keys, $blog_id);
101
 
340
  );
341
 
342
  if ( $query_results ) {
343
+ self::clear_form_cache();
344
  }
345
 
346
  return $query_results;
373
  $action_control = FrmFormActionsController::get_form_actions( 'email' );
374
  $action_control->destroy($id, 'all');
375
 
376
+ // Clear form caching
377
+ self::clear_form_cache();
378
+
379
  do_action('frm_destroy_form', $id);
380
  do_action('frm_destroy_form_'. $id);
381
  }
563
  return $counts;
564
  }
565
 
566
+ /**
567
+ * Clear form caching
568
+ * Called when a form is created, duplicated, or deleted
569
+ *
570
+ * @since 2.0.4
571
+ */
572
+ public static function clear_form_cache() {
573
+ FrmAppHelper::cache_delete_group( 'frm_form' );
574
+ }
575
+
576
  /**
577
  * @return array of errors
578
  */
classes/models/FrmFormAction.php CHANGED
@@ -342,13 +342,10 @@ class FrmFormAction {
342
  unset($settings['ID']);
343
  }
344
 
345
- // delete all styling caches
346
- FrmAppHelper::cache_delete_group('frm_actions');
347
 
348
- // Remove the balanceTags filter in case WordPress is trying to validate the XHTML
349
- remove_filter( 'content_save_pre', 'balanceTags', 50 );
350
-
351
- return wp_insert_post($settings);
352
  }
353
 
354
  public function get_single_action( $id ) {
@@ -454,6 +451,7 @@ class FrmFormAction {
454
 
455
  foreach ( $post_ids as $id ) {
456
  wp_delete_post($id);
 
457
  }
458
  }
459
 
342
  unset($settings['ID']);
343
  }
344
 
345
+ // delete all action caches
346
+ FrmFormActionsHelper::clear_action_cache( $settings['menu_order'] );
347
 
348
+ return FrmAppHelper::save_json_post( $settings );
 
 
 
349
  }
350
 
351
  public function get_single_action( $id ) {
451
 
452
  foreach ( $post_ids as $id ) {
453
  wp_delete_post($id);
454
+ FrmFormActionsHelper::clear_action_cache( $form_id );
455
  }
456
  }
457
 
classes/models/FrmNotification.php CHANGED
@@ -256,7 +256,7 @@ class FrmNotification{
256
  $part_1 = trim( str_replace( $part_2, '', $val ) );
257
  } else if ( in_array( $f, array( 'from', 'reply_to' ) ) ) {
258
  // In case someone just puts a name in the From or Reply To field
259
- $part_1 = $part_2;
260
  $part_2 = get_option('admin_email');
261
  } else {
262
  // In case someone just puts a name in any other email field
@@ -269,6 +269,17 @@ class FrmNotification{
269
  }
270
  }
271
 
 
 
 
 
 
 
 
 
 
 
 
272
  // Set up formatted value
273
  $final_val = '"'. str_replace( '"', '', $part_1 ) . '" <'. $part_2 .'>';
274
 
@@ -326,7 +337,7 @@ class FrmNotification{
326
  $charset = get_option('blog_charset');
327
 
328
  $header[] = 'Reply-To: '. $atts['reply_to'];
329
- $header[] = 'Content-Type: '. $content_type .'; charset="'. $charset . '"';
330
  $atts['subject'] = wp_specialchars_decode(strip_tags(stripslashes($atts['subject'])), ENT_QUOTES );
331
 
332
  $message = do_shortcode($atts['message']);
256
  $part_1 = trim( str_replace( $part_2, '', $val ) );
257
  } else if ( in_array( $f, array( 'from', 'reply_to' ) ) ) {
258
  // In case someone just puts a name in the From or Reply To field
259
+ $part_1 = $val;
260
  $part_2 = get_option('admin_email');
261
  } else {
262
  // In case someone just puts a name in any other email field
269
  }
270
  }
271
 
272
+ // if sending the email from a yahoo address, change it to the WordPress default
273
+ if ( $f == 'from' && strpos( $part_2, '@yahoo.com' ) ) {
274
+ // Get the site domain and get rid of www.
275
+ $sitename = strtolower( wp_strip_all_tags( $_SERVER['SERVER_NAME'] ) );
276
+ if ( substr( $sitename, 0, 4 ) == 'www.' ) {
277
+ $sitename = substr( $sitename, 4 );
278
+ }
279
+
280
+ $part_2 = 'wordpress@' . $sitename;
281
+ }
282
+
283
  // Set up formatted value
284
  $final_val = '"'. str_replace( '"', '', $part_1 ) . '" <'. $part_2 .'>';
285
 
337
  $charset = get_option('blog_charset');
338
 
339
  $header[] = 'Reply-To: '. $atts['reply_to'];
340
+ $header[] = 'Content-Type: ' . $content_type . '; charset="' . esc_attr( $charset ) . '"';
341
  $atts['subject'] = wp_specialchars_decode(strip_tags(stripslashes($atts['subject'])), ENT_QUOTES );
342
 
343
  $message = do_shortcode($atts['message']);
classes/models/FrmStyle.php CHANGED
@@ -40,7 +40,7 @@ class FrmStyle{
40
  // delete all styling caches
41
  FrmAppHelper::cache_delete_group('frm_styles');
42
 
43
- return wp_insert_post($settings);
44
  }
45
 
46
  public function duplicate($id) {
@@ -77,7 +77,7 @@ class FrmStyle{
77
  $new_instance['post_content'] = $_POST['frm_style_setting']['post_content'];
78
  $new_instance['post_type'] = FrmStylesController::$post_type;
79
  $new_instance['post_status'] = 'publish';
80
- $new_instance['menu_order'] = isset($_POST['frm_style_setting']['menu_order']) ? (int) $_POST['frm_style_setting']['menu_order'] : 0;
81
 
82
  if ( empty($id) ) {
83
  $new_instance['post_name'] = $new_instance['post_title'];
40
  // delete all styling caches
41
  FrmAppHelper::cache_delete_group('frm_styles');
42
 
43
+ return FrmAppHelper::save_json_post( $settings );
44
  }
45
 
46
  public function duplicate($id) {
77
  $new_instance['post_content'] = $_POST['frm_style_setting']['post_content'];
78
  $new_instance['post_type'] = FrmStylesController::$post_type;
79
  $new_instance['post_status'] = 'publish';
80
+ $new_instance['menu_order'] = isset( $_POST['frm_style_setting']['menu_order'] ) ? absint( $_POST['frm_style_setting']['menu_order'] ) : 0;
81
 
82
  if ( empty($id) ) {
83
  $new_instance['post_name'] = $new_instance['post_title'];
classes/views/frm-entries/new.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if ( empty($values) || ! isset($values['fields']) || empty($values['fields']) ) { ?>
3
  <div class="frm_forms <?php echo FrmFormsHelper::get_form_style_class($form); ?>" id="frm_form_<?php echo esc_attr( $form->id ) ?>_container">
4
- <div class="frm_error_style"><strong><?php _e( 'Oops!', 'formidable' ) ?></strong> <?php printf( __( 'You did not add any fields to your form. %1$sGo back%2$s and add some.', 'formidable' ), '<a href="'. admin_url('?page=formidable&frm_action=edit&id='. $form->id) .'">', '</a>' ) ?>
5
  </div>
6
  </div>
7
  <?php
1
  <?php
2
  if ( empty($values) || ! isset($values['fields']) || empty($values['fields']) ) { ?>
3
  <div class="frm_forms <?php echo FrmFormsHelper::get_form_style_class($form); ?>" id="frm_form_<?php echo esc_attr( $form->id ) ?>_container">
4
+ <div class="frm_error_style"><strong><?php _e( 'Oops!', 'formidable' ) ?></strong> <?php printf( __( 'You did not add any fields to your form. %1$sGo back%2$s and add some.', 'formidable' ), '<a href="' . esc_url( admin_url( '?page=formidable&frm_action=edit&id=' . $form->id ) ) . '">', '</a>' ) ?>
5
  </div>
6
  </div>
7
  <?php
classes/views/frm-entries/no_entries.php CHANGED
@@ -7,7 +7,7 @@ if ( $form && isset($form->options['no_save']) && $form->options['no_save'] ) {
7
  } else if ( $form ) {
8
  ?>
9
  <div class="frm_no_entries_header"><?php printf(__( 'No Entries for form: %s', 'formidable' ), $form->name); ?></div>
10
- <p class="frm_no_entries_text"><?php printf( __( 'For instructions on publishing your form see %1$sthis page%2$s <br/> or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidablepro.com/knowledgebase/publish-your-forms/" target="_blank">', '</a>', '<a href="'. admin_url('admin.php?page=formidable-entries&frm_action=new&form='. $form->id) .'">', '</a>'); ?></p>
11
  <?php
12
  } else {
13
  ?>
7
  } else if ( $form ) {
8
  ?>
9
  <div class="frm_no_entries_header"><?php printf(__( 'No Entries for form: %s', 'formidable' ), $form->name); ?></div>
10
+ <p class="frm_no_entries_text"><?php printf( __( 'For instructions on publishing your form see %1$sthis page%2$s <br/> or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidablepro.com/knowledgebase/publish-your-forms/" target="_blank">', '</a>', '<a href="' . esc_url( admin_url('admin.php?page=formidable-entries&frm_action=new&form=' . $form->id ) ) . '">', '</a>' ); ?></p>
11
  <?php
12
  } else {
13
  ?>
classes/views/frm-forms/add_field.php CHANGED
@@ -159,7 +159,7 @@ if ($display['options']){ ?>
159
  <td>
160
  <div class="hide-if-no-js edit-slug-box frm_help" title="<?php esc_attr_e( 'The field key can be used as an alternative to the field ID in many cases.', 'formidable' ) ?>">
161
  <?php _e( 'Field Key:', 'formidable' ) ?>
162
- <div class="<?php echo ($frm_settings->lock_keys) ? 'frm_field_key' : 'frm_ipe_field_key" title="'. __( 'Click to edit.', 'formidable' ); ?>" ><?php echo esc_html( $field['field_key'] ); ?></div>
163
  <?php if ( ! $frm_settings->lock_keys ) { ?>
164
  <input type="hidden" name="field_options[field_key_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['field_key'] ); ?>" />
165
  <?php } ?>
159
  <td>
160
  <div class="hide-if-no-js edit-slug-box frm_help" title="<?php esc_attr_e( 'The field key can be used as an alternative to the field ID in many cases.', 'formidable' ) ?>">
161
  <?php _e( 'Field Key:', 'formidable' ) ?>
162
+ <div class="<?php echo $frm_settings->lock_keys ? 'frm_field_key' : 'frm_ipe_field_key" title="'. esc_attr( __( 'Click to edit.', 'formidable' ) ); ?>" ><?php echo esc_html( $field['field_key'] ); ?></div>
163
  <?php if ( ! $frm_settings->lock_keys ) { ?>
164
  <input type="hidden" name="field_options[field_key_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['field_key'] ); ?>" />
165
  <?php } ?>
classes/views/frm-forms/add_field_links.php CHANGED
@@ -113,7 +113,8 @@ foreach ( FrmFieldsHelper::pro_field_selection() as $field_key => $field_type )
113
  'frm_three_col' => array( 'label' => __( '3 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into three columns.', 'formidable' )),
114
  'frm_four_col' => array( 'label' => __( '4 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into four columns.', 'formidable' )),
115
  'frm_total' => array( 'label' => __( 'Total', 'formidable' ), 'title' => __( 'Add this to a read-only field to display the text in bold without a border or background.', 'formidable' )),
116
- 'frm_scroll_box' => array( 'label' => __( 'Scroll Box', 'formidable' ), 'title' => __( 'If you have many checkbox or radio button options, you may add this class to allow your user to easily scroll through the options.', 'formidable' ))
 
117
  );
118
 
119
  $classes = apply_filters( 'frm_layout_classes', $classes );
113
  'frm_three_col' => array( 'label' => __( '3 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into three columns.', 'formidable' )),
114
  'frm_four_col' => array( 'label' => __( '4 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into four columns.', 'formidable' )),
115
  'frm_total' => array( 'label' => __( 'Total', 'formidable' ), 'title' => __( 'Add this to a read-only field to display the text in bold without a border or background.', 'formidable' )),
116
+ 'frm_scroll_box' => array( 'label' => __( 'Scroll Box', 'formidable' ), 'title' => __( 'If you have many checkbox or radio button options, you may add this class to allow your user to easily scroll through the options.', 'formidable' )),
117
+ 'frm_text_block' => array( 'label' => __( 'Align Option Text', 'formidable' ), 'title' => __( 'If you have a large amount of text in a checkbox or radio button field, use this class to align all the text in a block.', 'formidable' ) ),
118
  );
119
 
120
  $classes = apply_filters( 'frm_layout_classes', $classes );
classes/views/frm-forms/mb_html_tab.php CHANGED
@@ -19,7 +19,7 @@
19
  foreach ( $entry_shortcodes as $skey => $sname ) {
20
  ?>
21
  <li class="frm_col_<?php echo esc_attr( $col ) ?>">
22
- <a href="javascript:void(0)" class="show_field_custom_html frmbutton button frm_insert_code <?php echo is_array($sname) ? 'frm_help' : ''; ?>" data-code="<?php echo esc_attr($skey) ?>" <?php echo is_array($sname) ? 'title="'. $sname['title'] .'"' : ''; ?>><?php echo is_array($sname) ? $sname['label'] : $sname; ?></a>
23
  </li>
24
  <?php
25
  $col = ($col == 'one') ? 'two' : 'one';
19
  foreach ( $entry_shortcodes as $skey => $sname ) {
20
  ?>
21
  <li class="frm_col_<?php echo esc_attr( $col ) ?>">
22
+ <a href="javascript:void(0)" class="show_field_custom_html frmbutton button frm_insert_code <?php echo is_array( $sname ) ? 'frm_help' : ''; ?>" data-code="<?php echo esc_attr( $skey ) ?>" <?php echo is_array( $sname ) ? 'title="' . esc_attr( $sname['title'] ) . '"' : ''; ?>><?php echo is_array( $sname ) ? $sname['label'] : $sname; ?></a>
23
  </li>
24
  <?php
25
  $col = ($col == 'one') ? 'two' : 'one';
classes/views/shared/mb_adv_info.php CHANGED
@@ -203,7 +203,7 @@
203
  <ul class="frm_code_list">
204
  <?php foreach ( $user_fields as $uk => $uf ) { ?>
205
  <li class="frm_col_<?php echo esc_attr( $col ) ?>">
206
- <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr($uid->id .' show="'. $uk .'"') ?>"><?php echo esc_html( $uf ) ?></a>
207
  </li>
208
  <?php
209
  $col = ($col == 'one') ? 'two' : 'one';
203
  <ul class="frm_code_list">
204
  <?php foreach ( $user_fields as $uk => $uf ) { ?>
205
  <li class="frm_col_<?php echo esc_attr( $col ) ?>">
206
+ <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $uid->id . ' show="' . $uk . '"' ) ?>"><?php echo esc_html( $uf ) ?></a>
207
  </li>
208
  <?php
209
  $col = ($col == 'one') ? 'two' : 'one';
classes/views/styles/show.php CHANGED
@@ -61,7 +61,7 @@
61
  <div id="nav-menu-footer" class="submitbox">
62
  <div class="major-publishing-actions">
63
  <?php if ( ! empty( $style->ID ) && empty( $style->menu_order ) ) { ?>
64
- <a href="<?php echo admin_url('admin.php?page=formidable-styles&frm_action=destroy&id='. $style->ID); ?>" id="frm_delete_style" class="submitdelete deletion" onclick="return confirm('<?php _e( 'Are you sure you want to delete that style?', 'formidable' ) ?>')"><?php _e( 'Delete Style', 'formidable' ) ?></a>
65
  <?php } ?>
66
  <?php
67
  if ( $style->ID ) {
61
  <div id="nav-menu-footer" class="submitbox">
62
  <div class="major-publishing-actions">
63
  <?php if ( ! empty( $style->ID ) && empty( $style->menu_order ) ) { ?>
64
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=destroy&id=' . $style->ID ) ); ?>" id="frm_delete_style" class="submitdelete deletion" onclick="return confirm('<?php esc_attr_e( 'Are you sure you want to delete that style?', 'formidable' ) ?>')"><?php _e( 'Delete Style', 'formidable' ) ?></a>
65
  <?php } ?>
66
  <?php
67
  if ( $style->ID ) {
classes/widgets/FrmShowForm.php CHANGED
@@ -18,19 +18,14 @@ class FrmShowForm extends WP_Widget {
18
  $instance['description'] = isset($instance['description']) ? $instance['description'] : false;
19
 
20
  echo $args['before_widget'];
21
- $select_class = (isset($instance['select_width']) && $instance['select_width']) ? ' frm_set_select' : '';
22
- echo '<div class="frm_form_widget'. $select_class .'">';
23
  if ( $title ) {
24
  echo $args['before_title'] . stripslashes($title) . $args['after_title'];
25
  }
26
 
27
- global $frm_vars;
28
- if ( isset($instance['size']) && is_numeric($instance['size']) ) {
29
- $frm_vars['sidebar_width'] = $instance['size'];
30
- }
31
-
32
  echo FrmFormsController::show_form($instance['form'], '', false, $instance['description']);
33
- $frm_vars['sidebar_width'] = '';
34
  echo '</div>';
35
  echo $args['after_widget'];
36
  }
@@ -43,7 +38,6 @@ class FrmShowForm extends WP_Widget {
43
  //Defaults
44
  $instance = wp_parse_args( (array) $instance, array(
45
  'title' => false, 'form' => false, 'description' => false,
46
- 'size' => '140px', 'select_width' => false,
47
  ) );
48
  ?>
49
  <p><label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
@@ -60,14 +54,6 @@ class FrmShowForm extends WP_Widget {
60
 
61
  <p><label for="<?php echo esc_attr( $this->get_field_id('description') ); ?>"><input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo esc_attr( $this->get_field_id('description') ); ?>" name="<?php echo esc_attr( $this->get_field_name('description') ); ?>" value="1" />
62
  <?php _e( 'Show Description', 'formidable' ) ?></label></p>
63
-
64
- <p><label for="<?php echo esc_attr( $this->get_field_id('select_width') ); ?>"><input class="checkbox" type="checkbox" <?php checked($instance['select_width'], true) ?> id="<?php echo esc_attr( $this->get_field_id('select_width') ); ?>" name="<?php echo esc_attr( $this->get_field_name('select_width') ); ?>" value="1" />
65
- <?php _e( 'Fit Select Boxes into SideBar', 'formidable' ) ?></label></p>
66
-
67
- <p><label class="checkbox" for="<?php echo esc_attr( $this->get_field_id('size') ); ?>"><?php _e( 'Field Size', 'formidable' ) ?>:</label><br/>
68
- <input type="text" id="<?php echo esc_attr( $this->get_field_id('size') ); ?>" name="<?php echo esc_attr( $this->get_field_name('size') ); ?>" value="<?php echo esc_attr( $instance['size'] ); ?>" /><br/>
69
- <span class="howto"><?php _e( 'If your text fields are too big for your sidebar insert a size here.', 'formidable' ) ?></span>
70
- </p>
71
  <?php
72
  }
73
  }
18
  $instance['description'] = isset($instance['description']) ? $instance['description'] : false;
19
 
20
  echo $args['before_widget'];
21
+
22
+ echo '<div class="frm_form_widget">';
23
  if ( $title ) {
24
  echo $args['before_title'] . stripslashes($title) . $args['after_title'];
25
  }
26
 
 
 
 
 
 
27
  echo FrmFormsController::show_form($instance['form'], '', false, $instance['description']);
28
+
29
  echo '</div>';
30
  echo $args['after_widget'];
31
  }
38
  //Defaults
39
  $instance = wp_parse_args( (array) $instance, array(
40
  'title' => false, 'form' => false, 'description' => false,
 
41
  ) );
42
  ?>
43
  <p><label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
54
 
55
  <p><label for="<?php echo esc_attr( $this->get_field_id('description') ); ?>"><input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo esc_attr( $this->get_field_id('description') ); ?>" name="<?php echo esc_attr( $this->get_field_name('description') ); ?>" value="1" />
56
  <?php _e( 'Show Description', 'formidable' ) ?></label></p>
 
 
 
 
 
 
 
 
57
  <?php
58
  }
59
  }
css/_single_theme.css.php CHANGED
@@ -27,6 +27,17 @@ $label_margin = (int) $width + 10;
27
  $minus_icons = FrmStylesHelper::minus_icons();
28
  $arrow_icons = FrmStylesHelper::arrow_icons();
29
 
 
 
 
 
 
 
 
 
 
 
 
30
  if ( ! isset($collapse_icon) ) {
31
  $collapse_icon = 0;
32
  }
@@ -166,6 +177,43 @@ if ( ! isset($collapse_icon) ) {
166
  color:#<?php echo $form_desc_color . $important ?>;
167
  }
168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  .<?php echo $style_class ?> .frm_left_container p.description,
170
  .<?php echo $style_class ?> .frm_left_container div.description,
171
  .<?php echo $style_class ?> .frm_left_container div.frm_description,
@@ -174,16 +222,6 @@ if ( ! isset($collapse_icon) ) {
174
  max-width:62%<?php echo $important ?>;
175
  }
176
 
177
- .<?php echo $style_class ?> .form-field.frm_col_field div.frm_description{
178
- width:<?php echo ($field_width == '' ? 'auto' : $field_width) . $important ?>;
179
- max-width:100%;
180
- }
181
-
182
- .<?php echo $style_class ?> .frm_left_container .attachment-thumbnail{
183
- clear:both;
184
- margin-left:<?php echo $label_margin ?>px<?php echo $important ?>;
185
- }
186
-
187
  .<?php echo $style_class ?> .frm_right_container p.description,
188
  .<?php echo $style_class ?> .frm_right_container div.description,
189
  .<?php echo $style_class ?> .frm_right_container div.frm_description,
@@ -192,51 +230,25 @@ if ( ! isset($collapse_icon) ) {
192
  max-width:62%<?php echo $important ?>;
193
  }
194
 
195
- .<?php echo $style_class ?> .frm_inline_container label.frm_primary_label,
196
- .<?php echo $style_class ?> .frm_inline_container .frm_opt_container{
197
- display:inline<?php echo $important ?>;
198
- }
199
-
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
 
207
  .<?php echo $style_class ?> .frm_left_container.frm_inline label.frm_primary_label{
208
  max-width:90%<?php echo $important ?>;
209
  }
210
 
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
 
239
- .<?php echo $style_class ?> .frm_right_container label.frm_primary_label,
240
  .<?php echo $style_class ?> .frm_pos_right{
241
  display:inline<?php echo $important ?>;
242
  width:<?php echo $width . $important; ?>;
@@ -653,6 +665,11 @@ if ( ! $submit_style ) { ?>
653
  width:auto<?php echo $important ?>;
654
  }
655
 
 
 
 
 
 
656
  .<?php echo $style_class ?> .frm_button{
657
  padding-top:<?php echo $field_pad . $important ?>;
658
  padding-bottom:<?php echo $field_pad . $important ?>;
@@ -722,24 +739,6 @@ if ( ! $submit_style ) { ?>
722
  margin-right:0
723
  }
724
 
725
- .<?php echo $style_class ?> .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
726
- .<?php echo $style_class ?> .frm_form_field.frm_right_half.frm_left_container .frm_primary_label,
727
- .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_left_container .frm_primary_label,
728
- .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_left_container .frm_primary_label,
729
- .<?php echo $style_class ?> .frm_form_field.frm_half.frm_last.frm_left_container .frm_primary_label{
730
- padding-left:10px;
731
- padding-right:0;
732
- }
733
-
734
- .<?php echo $style_class ?> .frm_form_field.frm_left_half.frm_right_container .frm_primary_label,
735
- .<?php echo $style_class ?> .frm_form_field.frm_right_half.frm_right_container .frm_primary_label,
736
- .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_right_container .frm_primary_label,
737
- .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_right_container .frm_primary_label,
738
- .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container .frm_primary_label{
739
- padding-right:10px;
740
- padding-left:0;
741
- }
742
-
743
  .<?php echo $style_class ?> .frm_form_field.frm_left_third,
744
  .<?php echo $style_class ?> .frm_form_field.frm_first_third,
745
  .<?php echo $style_class ?> .frm_form_field.frm_third,
@@ -834,4 +833,122 @@ if ( ! $submit_style ) { ?>
834
  .<?php echo $style_class ?> .chosen-container-multi .chosen-choices li.search-field input[type="text"]{
835
  height:15px<?php echo $important ?>;
836
  }
837
- /* End Chosen */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  $minus_icons = FrmStylesHelper::minus_icons();
28
  $arrow_icons = FrmStylesHelper::arrow_icons();
29
 
30
+ // If left/right label is over a certain size, adjust the field description margin at a different screen size
31
+ $temp_label_width = str_replace( 'px', '', $width );
32
+ $change_margin = false;
33
+ if ( $temp_label_width >= 230 ) {
34
+ $change_margin = 800 . 'px';
35
+ } else if ( $width >= 215 ) {
36
+ $change_margin = 700 . 'px';
37
+ } else if ( $width >= 180 ) {
38
+ $change_margin = 650 . 'px';
39
+ }
40
+
41
  if ( ! isset($collapse_icon) ) {
42
  $collapse_icon = 0;
43
  }
177
  color:#<?php echo $form_desc_color . $important ?>;
178
  }
179
 
180
+
181
+ /* Left and right labels */
182
+ .<?php echo $style_class ?> .frm_left_container label.frm_primary_label{
183
+ float:left;
184
+ display:inline<?php echo $important ?>;
185
+ width:<?php echo $width . $important ?>;
186
+ max-width:33%<?php echo $important ?>;
187
+ margin-right:10px<?php echo $important ?>;
188
+ }
189
+
190
+ .<?php echo $style_class ?> .frm_right_container label.frm_primary_label{
191
+ display:inline<?php echo $important ?>;
192
+ width:<?php echo $width . $important; ?>;
193
+ max-width:33%<?php echo $important ?>;
194
+ margin-left:10px<?php echo $important ?>;
195
+ }
196
+
197
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container input:not([type=radio]):not([type=checkbox]),
198
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container select,
199
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container textarea,
200
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container:not(.frm_dynamic_select_container) .frm_opt_container,
201
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container .g-recaptcha,
202
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
203
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container select,
204
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container textarea,
205
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) .frm_opt_container,
206
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container .g-recaptcha{
207
+ max-width:62%<?php echo $important ?>;
208
+ }
209
+
210
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container:not(.frm_dynamic_select_container) .frm_opt_container,
211
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) .frm_opt_container,
212
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container .g-recaptcha,
213
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container .g-recaptcha{
214
+ display:inline-block<?php echo $important ?>;
215
+ }
216
+
217
  .<?php echo $style_class ?> .frm_left_container p.description,
218
  .<?php echo $style_class ?> .frm_left_container div.description,
219
  .<?php echo $style_class ?> .frm_left_container div.frm_description,
222
  max-width:62%<?php echo $important ?>;
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
225
  .<?php echo $style_class ?> .frm_right_container p.description,
226
  .<?php echo $style_class ?> .frm_right_container div.description,
227
  .<?php echo $style_class ?> .frm_right_container div.frm_description,
230
  max-width:62%<?php echo $important ?>;
231
  }
232
 
233
+ .<?php echo $style_class ?> .frm_left_container .attachment-thumbnail{
234
+ clear:both;
235
+ margin-left:<?php echo $label_margin ?>px<?php echo $important ?>;
 
 
 
 
 
 
 
236
  }
237
 
238
  .<?php echo $style_class ?> .frm_left_container.frm_inline label.frm_primary_label{
239
  max-width:90%<?php echo $important ?>;
240
  }
241
 
242
+ .<?php echo $style_class ?> .form-field.frm_col_field div.frm_description{
243
+ width:<?php echo ($field_width == '' ? 'auto' : $field_width) . $important ?>;
244
+ max-width:100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  }
246
 
247
+ .<?php echo $style_class ?> .frm_inline_container label.frm_primary_label,
248
+ .<?php echo $style_class ?> .frm_inline_container:not(.frm_dynamic_select_container) .frm_opt_container{
249
+ display:inline<?php echo $important ?>;
250
  }
251
 
 
252
  .<?php echo $style_class ?> .frm_pos_right{
253
  display:inline<?php echo $important ?>;
254
  width:<?php echo $width . $important; ?>;
665
  width:auto<?php echo $important ?>;
666
  }
667
 
668
+ .<?php echo $style_class ?> .frm_text_block input,
669
+ .<?php echo $style_class ?> .frm_text_block label.frm_primary_label{
670
+ margin-left:-20px;
671
+ }
672
+
673
  .<?php echo $style_class ?> .frm_button{
674
  padding-top:<?php echo $field_pad . $important ?>;
675
  padding-bottom:<?php echo $field_pad . $important ?>;
739
  margin-right:0
740
  }
741
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
742
  .<?php echo $style_class ?> .frm_form_field.frm_left_third,
743
  .<?php echo $style_class ?> .frm_form_field.frm_first_third,
744
  .<?php echo $style_class ?> .frm_form_field.frm_third,
833
  .<?php echo $style_class ?> .chosen-container-multi .chosen-choices li.search-field input[type="text"]{
834
  height:15px<?php echo $important ?>;
835
  }
836
+ /* End Chosen */
837
+
838
+ /* Responsive CSS */
839
+ <?php if ( $change_margin !== false ) { ?>
840
+ @media only screen and (max-width: <?php echo $change_margin ?>){
841
+ .<?php echo $style_class ?> .frm_left_container p.description,
842
+ .<?php echo $style_class ?> .frm_left_container div.description,
843
+ .<?php echo $style_class ?> .frm_left_container div.frm_description,
844
+ .<?php echo $style_class ?> .frm_left_container .frm_error,
845
+ .<?php echo $style_class ?> .frm_left_container .attachment-thumbnail{
846
+ margin-left:33%<?php echo $important ?>;
847
+ padding-left:10px<?php echo $important ?>;
848
+ }
849
+ .<?php echo $style_class ?> .frm_right_container p.description,
850
+ .<?php echo $style_class ?> .frm_right_container div.description,
851
+ .<?php echo $style_class ?> .frm_right_container div.frm_description,
852
+ .<?php echo $style_class ?> .frm_right_container .frm_error{
853
+ margin-right:33%<?php echo $important ?>;
854
+ padding-right:10px<?php echo $important ?>;
855
+ }
856
+ }
857
+ <?php } ?>
858
+
859
+ @media only screen and (max-width: 600px){
860
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container input:not([type=radio]):not([type=checkbox]),
861
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container select,
862
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container textarea,
863
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container .frm_opt_container,
864
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container.g-recaptcha,
865
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container input:not([type=radio]):not([type=checkbox]),
866
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container select,
867
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container textarea,
868
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container .frm_opt_container,
869
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container.g-recaptcha{
870
+ max-width:100%<?php echo $important ?>;
871
+ }
872
+ .<?php echo $style_class ?> .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
873
+ .<?php echo $style_class ?> .frm_form_field.frm_right_half.frm_left_container .frm_primary_label,
874
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_left_container .frm_primary_label,
875
+ .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_left_container .frm_primary_label,
876
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container .frm_primary_label,
877
+ .<?php echo $style_class ?> .frm_form_field.frm_left_half.frm_right_container .frm_primary_label,
878
+ .<?php echo $style_class ?> .frm_form_field.frm_right_half.frm_right_container .frm_primary_label,
879
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_right_container .frm_primary_label,
880
+ .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_right_container .frm_primary_label,
881
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container .frm_primary_label{
882
+ max-width:100%<?php echo $important ?>;
883
+ margin-right:0;
884
+ margin-left:0;
885
+ padding-right:0;
886
+ padding-left:0;
887
+ width:100%<?php echo $important ?>;
888
+ }
889
+
890
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_right_container div.frm_description,
891
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_right_container .frm_error,
892
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half .frm_right_container div.frm_description,
893
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half .frm_right_container .frm_error,
894
+ .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_right_container div.frm_description,
895
+ .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_right_container .frm_error,
896
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container div.frm_description,
897
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_right_container .frm_error,
898
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_left_container div.frm_description,
899
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half.frm_left_container .frm_error,
900
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half .frm_left_container div.frm_description,
901
+ .<?php echo $style_class ?> .frm_form_field.frm_first_half .frm_left_container .frm_error,
902
+ .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_left_container div.frm_description,
903
+ .<?php echo $style_class ?> .frm_form_field.frm_last_half.frm_left_container .frm_error,
904
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container div.frm_description,
905
+ .<?php echo $style_class ?> .frm_form_field.frm_half.frm_left_container .frm_error{
906
+ margin-right:0;
907
+ margin-left:0;
908
+ padding-right:0;
909
+ padding-left:0;
910
+ }
911
+ }
912
+
913
+ @media only screen and (max-width: 500px) {
914
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container input:not([type=radio]):not([type=checkbox]),
915
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container select,
916
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container textarea,
917
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container:not(.frm_dynamic_select_container) .frm_opt_container,
918
+ .<?php echo $style_class ?> .frm_form_field.frm_left_container .g-recaptcha,
919
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
920
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container select,
921
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container textarea,
922
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) .frm_opt_container,
923
+ .<?php echo $style_class ?> .frm_form_field.frm_right_container .g-recaptcha,
924
+ .<?php echo $style_class ?> .frm_left_container p.description,
925
+ .<?php echo $style_class ?> .frm_left_container div.description,
926
+ .<?php echo $style_class ?> .frm_left_container div.frm_description,
927
+ .<?php echo $style_class ?> .frm_left_container .frm_error,
928
+ .<?php echo $style_class ?> .frm_left_container .attachment-thumbnail,
929
+ .<?php echo $style_class ?> .frm_right_container p.description,
930
+ .<?php echo $style_class ?> .frm_right_container div.description,
931
+ .<?php echo $style_class ?> .frm_right_container div.frm_description,
932
+ .<?php echo $style_class ?> .frm_right_container .frm_error{
933
+ max-width:100%<?php echo $important ?>;
934
+ }
935
+ .<?php echo $style_class ?> .frm_left_container p.description,
936
+ .<?php echo $style_class ?> .frm_left_container div.description,
937
+ .<?php echo $style_class ?> .frm_left_container div.frm_description,
938
+ .<?php echo $style_class ?> .frm_left_container .frm_error,
939
+ .<?php echo $style_class ?> .frm_left_container .attachment-thumbnail,
940
+ .<?php echo $style_class ?> .frm_right_container p.description,
941
+ .<?php echo $style_class ?> .frm_right_container div.description,
942
+ .<?php echo $style_class ?> .frm_right_container div.frm_description,
943
+ .<?php echo $style_class ?> .frm_right_container .frm_error,
944
+ .<?php echo $style_class ?> .frm_left_container label.frm_primary_label,
945
+ .<?php echo $style_class ?> .frm_right_container label.frm_primary_label{
946
+ width:100%<?php echo $important ?>;
947
+ max-width:100%<?php echo $important ?>;
948
+ margin-right:0px<?php echo $important ?>;
949
+ margin-left:0px<?php echo $important ?>;
950
+ padding-right:0px<?php echo $important ?>;
951
+ padding-left:0px<?php echo $important ?>;
952
+ }
953
+ }
954
+ /* End Responsive CSS*/
css/custom_theme.css.php CHANGED
@@ -64,15 +64,11 @@ legend.frm_hidden{
64
  }
65
 
66
  .with_frm_style .frm_inline_container label.frm_primary_label,
67
- .with_frm_style .frm_inline_container .frm_opt_container{
68
  display:inline;
69
  margin-right:10px;
70
  }
71
 
72
- .with_frm_style .frm_left_container label.frm_primary_label{
73
- float:left;
74
- }
75
-
76
  .with_frm_style .frm_right_container label.frm_primary_label,
77
  .with_frm_style .frm_pos_right{
78
  display:inline;
@@ -111,6 +107,10 @@ legend.frm_hidden{
111
  line-height:normal;
112
  }
113
 
 
 
 
 
114
  .with_frm_style .frm_catlevel_2,
115
  .with_frm_style .frm_catlevel_3,
116
  .with_frm_style .frm_catlevel_4,
@@ -137,11 +137,6 @@ legend.frm_hidden{
137
  width:auto;
138
  }
139
 
140
- .frm_set_select .with_frm_style select,
141
- .frm_set_select .with_frm_style select.auto_width{
142
- width:100%;
143
- }
144
-
145
  .with_frm_style .frm_button{
146
  text-decoration:none;
147
  border:1px solid #eee;
@@ -708,39 +703,6 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
708
  margin-right:4%;
709
  }
710
 
711
- .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
712
- .frm_form_field.frm_right_half.frm_left_container .frm_primary_label,
713
- .frm_form_field.frm_left_half.frm_right_container .frm_primary_label,
714
- .frm_form_field.frm_right_half.frm_right_container .frm_primary_label,
715
- .frm_form_field.frm_first_half.frm_left_container .frm_primary_label,
716
- .frm_form_field.frm_last_half.frm_left_container .frm_primary_label,
717
- .frm_form_field.frm_first_half.frm_right_container .frm_primary_label,
718
- .frm_form_field.frm_last_half.frm_right_container .frm_primary_label,
719
- .frm_form_field.frm_half.frm_right_container .frm_primary_label{
720
- -webkit-box-sizing:border-box;
721
- -moz-box-sizing:border-box;
722
- box-sizing:border-box;
723
- max-width:33%;
724
- margin-right:0;
725
- margin-left:0;
726
- }
727
-
728
- .frm_form_field.frm_left_half.frm_left_container .frm_primary_label,
729
- .frm_form_field.frm_right_half.frm_left_container .frm_primary_label,
730
- .frm_form_field.frm_first_half.frm_left_container .frm_primary_label,
731
- .frm_form_field.frm_last_half.frm_left_container .frm_primary_label,
732
- .frm_form_field.frm_half.frm_left_container .frm_primary_label{
733
- padding-right:10px;
734
- }
735
-
736
- .frm_form_field.frm_left_half.frm_right_container .frm_primary_label,
737
- .frm_form_field.frm_right_half.frm_right_container .frm_primary_label,
738
- .frm_form_field.frm_first_half.frm_right_container .frm_primary_label,
739
- .frm_form_field.frm_last_half.frm_right_container .frm_primary_label,
740
- .frm_form_field.frm_half.frm_right_container .frm_primary_label{
741
- padding-left:10px;
742
- }
743
-
744
  .with_frm_style .frm_form_field.frm_first_half.frm_right_container div.frm_description,
745
  .with_frm_style .frm_form_field.frm_first_half.frm_right_container .frm_error,
746
  .with_frm_style .frm_form_field.frm_first_half .frm_right_container div.frm_description,
@@ -881,6 +843,59 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
881
  width:auto !important;
882
  }
883
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
884
  .wp-editor-wrap *,
885
  .wp-editor-wrap *:after,
886
  .wp-editor-wrap *:before{
@@ -1740,7 +1755,6 @@ html[xmlns] .frm_clearfix{
1740
  .frm_form_field.frm_four_col .frm_checkbox:nth-child(2n+2){
1741
  margin-right:0;
1742
  }
1743
-
1744
  }
1745
 
1746
  @media only screen and (max-width: 500px) {
@@ -1753,22 +1767,6 @@ html[xmlns] .frm_clearfix{
1753
  float: none;
1754
  display:block;
1755
  }
1756
-
1757
- .frm_right_container p.description,
1758
- .frm_right_container div.description,
1759
- .frm_right_container div.frm_description,
1760
- .frm_right_container .frm_error{
1761
- margin-right:33% !important;
1762
- padding-right:12px !important;
1763
- }
1764
-
1765
- .frm_left_container p.description,
1766
- .frm_left_container div.description,
1767
- .frm_left_container div.frm_description,
1768
- .frm_left_container .frm_error{
1769
- margin-left:33% !important;
1770
- padding-left:12px !important;
1771
- }
1772
  }
1773
  <?php
1774
  echo $defaults['custom_css'];
64
  }
65
 
66
  .with_frm_style .frm_inline_container label.frm_primary_label,
67
+ .with_frm_style .frm_inline_container:not(.frm_dynamic_select_container) .frm_opt_container{
68
  display:inline;
69
  margin-right:10px;
70
  }
71
 
 
 
 
 
72
  .with_frm_style .frm_right_container label.frm_primary_label,
73
  .with_frm_style .frm_pos_right{
74
  display:inline;
107
  line-height:normal;
108
  }
109
 
110
+ .with_frm_style select{
111
+ white-space:nowrap;
112
+ }
113
+
114
  .with_frm_style .frm_catlevel_2,
115
  .with_frm_style .frm_catlevel_3,
116
  .with_frm_style .frm_catlevel_4,
137
  width:auto;
138
  }
139
 
 
 
 
 
 
140
  .with_frm_style .frm_button{
141
  text-decoration:none;
142
  border:1px solid #eee;
703
  margin-right:4%;
704
  }
705
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
706
  .with_frm_style .frm_form_field.frm_first_half.frm_right_container div.frm_description,
707
  .with_frm_style .frm_form_field.frm_first_half.frm_right_container .frm_error,
708
  .with_frm_style .frm_form_field.frm_first_half .frm_right_container div.frm_description,
843
  width:auto !important;
844
  }
845
 
846
+ /* Left and right label styling for non-Formidable styling - very basic, not responsive */
847
+ .frm_form_field.frm_left_container label.frm_primary_label{
848
+ float:left;
849
+ display:inline;
850
+ max-width:33%;
851
+ margin-right:10px;
852
+ }
853
+
854
+ .frm_form_field.frm_left_container input:not([type=radio]):not([type=checkbox]),
855
+ .frm_form_field.frm_left_container select,
856
+ .frm_form_field.frm_left_container textarea,
857
+ .frm_form_field.frm_left_container:not(.frm_dynamic_select_container) .frm_opt_container,
858
+ .frm_form_field.frm_left_container .g-recaptcha,
859
+ .frm_form_field.frm_right_container input:not([type=radio]):not([type=checkbox]),
860
+ .frm_form_field.frm_right_container select,
861
+ .frm_form_field.frm_right_container textarea,
862
+ .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) .frm_opt_container,
863
+ .frm_form_field.frm_right_container .g-recaptcha{
864
+ max-width:62%;
865
+ }
866
+
867
+ .frm_form_field.frm_left_container:not(.frm_dynamic_select_container) .frm_opt_container,
868
+ .frm_form_field.frm_right_container:not(.frm_dynamic_select_container) .frm_opt_container,
869
+ .frm_form_field.frm_left_container .g-recaptcha,
870
+ .frm_form_field.frm_right_container .g-recaptcha{
871
+ display:inline-block;
872
+ }
873
+
874