Version Description
- Fix: The visual form styler didn't look good when CSS grids were turned off
- Fix: Prevent past database migrations from being run again. This was making some field sizes much larger.
- Fix: If field sizes are extra long, reverse them because it most likely happened in the last release.
- Fix: Sort by a number field on the entries page was ordering by text instead of number
- Fix: The export page was showing weird styling for the form selector on some sites
- Fix: If CSS grids are off, don't force the width to 100% for form fields like before
Download this release
Release Info
Developer | sswells |
Plugin | Formidable Forms – Form Builder for WordPress |
Version | 3.0.05 |
Comparing to | |
See all releases |
Code changes from version 3.0.04 to 3.0.05
- classes/controllers/FrmAppController.php +5 -4
- classes/helpers/FrmAppHelper.php +2 -2
- classes/helpers/FrmEntriesListHelper.php +1 -1
- classes/helpers/FrmFormsHelper.php +28 -9
- classes/models/FrmDb.php +1 -1
- classes/models/FrmMigrate.php +153 -75
- classes/views/styles/_sample_form.php +8 -8
- classes/views/xml/import_form.php +1 -1
- css/frm_admin.css +1 -0
- css/frm_old_grids.css +7 -0
- formidable.php +1 -1
- js/formidable_admin.js +1 -1
- readme.txt +9 -1
classes/controllers/FrmAppController.php
CHANGED
@@ -219,7 +219,6 @@ class FrmAppController {
|
|
219 |
* @since 3.0.04
|
220 |
*/
|
221 |
public static function compare_for_update( $atts ) {
|
222 |
-
$needs_upgrade = false;
|
223 |
$db_version = get_option( $atts['option'] );
|
224 |
|
225 |
if ( strpos( $db_version, '-' ) === false ) {
|
@@ -322,9 +321,11 @@ class FrmAppController {
|
|
322 |
FrmAppHelper::localize_script( 'admin' );
|
323 |
|
324 |
wp_enqueue_style( 'formidable-admin' );
|
325 |
-
|
326 |
-
|
327 |
-
|
|
|
|
|
328 |
|
329 |
wp_register_script( 'formidable-editinplace', FrmAppHelper::plugin_url() . '/js/jquery/jquery.editinplace.packed.js', array( 'jquery' ), '2.3.0' );
|
330 |
|
219 |
* @since 3.0.04
|
220 |
*/
|
221 |
public static function compare_for_update( $atts ) {
|
|
|
222 |
$db_version = get_option( $atts['option'] );
|
223 |
|
224 |
if ( strpos( $db_version, '-' ) === false ) {
|
321 |
FrmAppHelper::localize_script( 'admin' );
|
322 |
|
323 |
wp_enqueue_style( 'formidable-admin' );
|
324 |
+
if ( 'formidable-styles' !== $page ) {
|
325 |
+
wp_enqueue_style( 'formidable-grids' );
|
326 |
+
wp_enqueue_style( 'formidable-dropzone' );
|
327 |
+
add_thickbox();
|
328 |
+
}
|
329 |
|
330 |
wp_register_script( 'formidable-editinplace', FrmAppHelper::plugin_url() . '/js/jquery/jquery.editinplace.packed.js', array( 'jquery' ), '2.3.0' );
|
331 |
|
classes/helpers/FrmAppHelper.php
CHANGED
@@ -4,14 +4,14 @@ if ( ! defined('ABSPATH') ) {
|
|
4 |
}
|
5 |
|
6 |
class FrmAppHelper {
|
7 |
-
public static $db_version =
|
8 |
public static $pro_db_version = 37; //deprecated
|
9 |
public static $font_version = 3;
|
10 |
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
-
public static $plug_version = '3.0.
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
4 |
}
|
5 |
|
6 |
class FrmAppHelper {
|
7 |
+
public static $db_version = 86; //version of the database we are moving to
|
8 |
public static $pro_db_version = 37; //deprecated
|
9 |
public static $font_version = 3;
|
10 |
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
+
public static $plug_version = '3.0.05';
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
classes/helpers/FrmEntriesListHelper.php
CHANGED
@@ -44,7 +44,7 @@ class FrmEntriesListHelper extends FrmListHelper {
|
|
44 |
|
45 |
if ( strpos( $orderby, 'meta' ) !== false ) {
|
46 |
$order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) );
|
47 |
-
$orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '
|
48 |
}
|
49 |
|
50 |
$order = self::get_param( array(
|
44 |
|
45 |
if ( strpos( $orderby, 'meta' ) !== false ) {
|
46 |
$order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) );
|
47 |
+
$orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : '';
|
48 |
}
|
49 |
|
50 |
$order = self::get_param( array(
|
classes/helpers/FrmFormsHelper.php
CHANGED
@@ -880,7 +880,7 @@ BEFORE_HTML;
|
|
880 |
}
|
881 |
|
882 |
public static function grid_classes() {
|
883 |
-
|
884 |
'frm_half' => '1/2',
|
885 |
|
886 |
'frm_third' => '1/3',
|
@@ -888,18 +888,37 @@ BEFORE_HTML;
|
|
888 |
|
889 |
'frm_fourth' => '1/4',
|
890 |
'frm_three_fourths' => '3/4',
|
|
|
891 |
|
892 |
-
|
893 |
-
|
|
|
|
|
|
|
894 |
|
895 |
-
|
896 |
-
|
897 |
|
898 |
-
|
899 |
-
'frm7' => '7/12',
|
900 |
|
901 |
-
|
902 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
903 |
}
|
904 |
|
905 |
/**
|
880 |
}
|
881 |
|
882 |
public static function grid_classes() {
|
883 |
+
$base = array(
|
884 |
'frm_half' => '1/2',
|
885 |
|
886 |
'frm_third' => '1/3',
|
888 |
|
889 |
'frm_fourth' => '1/4',
|
890 |
'frm_three_fourths' => '3/4',
|
891 |
+
);
|
892 |
|
893 |
+
$frm_settings = FrmAppHelper::get_settings();
|
894 |
+
if ( $frm_settings->old_css ) {
|
895 |
+
$classes = array(
|
896 |
+
'frm_fifth' => '1/5',
|
897 |
+
'frm_four_fifths' => '4/5',
|
898 |
|
899 |
+
'frm_two_fifths' => '2/5',
|
900 |
+
'frm_three_fifths' => '3/5',
|
901 |
|
902 |
+
'frm_sixth' => '1/6',
|
|
|
903 |
|
904 |
+
'frm_full' => '100%',
|
905 |
+
);
|
906 |
+
} else {
|
907 |
+
$classes = array(
|
908 |
+
'frm_sixth' => '1/6',
|
909 |
+
'frm10' => '5/6',
|
910 |
+
|
911 |
+
'frm11' => '11/12',
|
912 |
+
'frm1' => '1/12',
|
913 |
+
|
914 |
+
'frm5' => '5/12',
|
915 |
+
'frm7' => '7/12',
|
916 |
+
|
917 |
+
'frm12' => '100%',
|
918 |
+
);
|
919 |
+
}
|
920 |
+
|
921 |
+
return array_merge( $base, $classes );
|
922 |
}
|
923 |
|
924 |
/**
|
classes/models/FrmDb.php
CHANGED
@@ -475,7 +475,7 @@ class FrmDb {
|
|
475 |
$order = trim( reset( $order_query ) );
|
476 |
$safe_order = array( 'count(*)' );
|
477 |
if ( ! in_array( strtolower( $order ), $safe_order ) ) {
|
478 |
-
$order = preg_replace( '/[^a-zA-Z0-9\-\_
|
479 |
}
|
480 |
|
481 |
$order_by = '';
|
475 |
$order = trim( reset( $order_query ) );
|
476 |
$safe_order = array( 'count(*)' );
|
477 |
if ( ! in_array( strtolower( $order ), $safe_order ) ) {
|
478 |
+
$order = preg_replace( '/[^a-zA-Z0-9\-\_\.\+]/', '', $order );
|
479 |
}
|
480 |
|
481 |
$order_by = '';
|
classes/models/FrmMigrate.php
CHANGED
@@ -25,24 +25,23 @@ class FrmMigrate {
|
|
25 |
|
26 |
$frm_vars['doing_upgrade'] = true;
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
}
|
34 |
|
35 |
-
if ( $
|
36 |
// update rewrite rules for views and other custom post types
|
37 |
flush_rewrite_rules();
|
38 |
|
39 |
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
40 |
|
41 |
$this->create_tables();
|
42 |
-
$this->migrate_data(
|
43 |
|
44 |
/***** SAVE DB VERSION *****/
|
45 |
-
update_option( 'frm_db_version', FrmAppHelper::plugin_version() . '-' .
|
46 |
|
47 |
/**** ADD/UPDATE DEFAULT TEMPLATES ****/
|
48 |
FrmXMLController::add_default_templates();
|
@@ -184,19 +183,31 @@ class FrmMigrate {
|
|
184 |
}
|
185 |
}
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
$function_name = 'migrate_to_' . $migration;
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
|
201 |
public function uninstall() {
|
202 |
if ( ! current_user_can( 'administrator' ) ) {
|
@@ -250,6 +261,88 @@ class FrmMigrate {
|
|
250 |
return true;
|
251 |
}
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
/**
|
254 |
* Migrate old styling settings. If sites are using the old
|
255 |
* default 400px field width, switch it to 100%
|
@@ -287,57 +380,51 @@ class FrmMigrate {
|
|
287 |
}
|
288 |
}
|
289 |
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
$pixel_conversion = 9;
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
'field_options not like' => 's:4:"size";s:0:',
|
303 |
-
);
|
304 |
|
305 |
-
|
306 |
-
$fields = FrmDb::get_results( $this->fields, $query, 'id, field_options' );
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
if ( empty($f->field_options['size']) || ! is_numeric($f->field_options['size']) ) {
|
312 |
-
continue;
|
313 |
-
}
|
314 |
|
315 |
-
|
316 |
-
|
317 |
-
$u = FrmField::update( $f->id, array( 'field_options' => $f->field_options ) );
|
318 |
-
if ( $u ) {
|
319 |
-
$updated++;
|
320 |
-
}
|
321 |
-
unset($f);
|
322 |
-
}
|
323 |
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
|
|
|
|
|
|
329 |
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
$
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
|
|
|
|
|
|
|
|
341 |
|
342 |
/**
|
343 |
* Migrate post and email notification settings into actions
|
@@ -423,7 +510,6 @@ DEFAULT_HTML;
|
|
423 |
}
|
424 |
unset($form);
|
425 |
}
|
426 |
-
unset($forms);
|
427 |
}
|
428 |
|
429 |
private function migrate_to_6() {
|
@@ -464,12 +550,4 @@ DEFAULT_HTML;
|
|
464 |
}
|
465 |
unset($default_html, $old_default_html, $fields);
|
466 |
}
|
467 |
-
|
468 |
-
private function migrate_to_4() {
|
469 |
-
global $wpdb;
|
470 |
-
$user_ids = FrmEntryMeta::getAll( array( 'fi.type' => 'user_id' ) );
|
471 |
-
foreach ( $user_ids as $user_id ) {
|
472 |
-
$wpdb->update( $this->entries, array( 'user_id' => $user_id->meta_value ), array( 'id' => $user_id->item_id ) );
|
473 |
-
}
|
474 |
-
}
|
475 |
}
|
25 |
|
26 |
$frm_vars['doing_upgrade'] = true;
|
27 |
|
28 |
+
$needs_upgrade = FrmAppController::compare_for_update( array(
|
29 |
+
'option' => 'frm_db_version',
|
30 |
+
'new_db_version' => FrmAppHelper::$db_version,
|
31 |
+
'new_plugin_version' => FrmAppHelper::plugin_version(),
|
32 |
+
) );
|
|
|
33 |
|
34 |
+
if ( $needs_upgrade ) {
|
35 |
// update rewrite rules for views and other custom post types
|
36 |
flush_rewrite_rules();
|
37 |
|
38 |
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
39 |
|
40 |
$this->create_tables();
|
41 |
+
$this->migrate_data( $old_db_version );
|
42 |
|
43 |
/***** SAVE DB VERSION *****/
|
44 |
+
update_option( 'frm_db_version', FrmAppHelper::plugin_version() . '-' . FrmAppHelper::$db_version );
|
45 |
|
46 |
/**** ADD/UPDATE DEFAULT TEMPLATES ****/
|
47 |
FrmXMLController::add_default_templates();
|
183 |
}
|
184 |
}
|
185 |
|
186 |
+
/**
|
187 |
+
* @param int|string $old_db_version
|
188 |
+
*/
|
189 |
+
private function migrate_data( $old_db_version ) {
|
190 |
+
if ( ! $old_db_version ) {
|
191 |
+
$old_db_version = get_option( 'frm_db_version' );
|
192 |
+
}
|
193 |
+
if ( strpos( $old_db_version, '-' ) ) {
|
194 |
+
$last_upgrade = explode( '-', $old_db_version );
|
195 |
+
$old_db_version = (int) $last_upgrade[1];
|
196 |
+
}
|
197 |
+
|
198 |
+
if ( ! is_numeric( $old_db_version ) ) {
|
199 |
+
// bail if we don't know the previous version
|
200 |
+
return;
|
201 |
+
}
|
202 |
+
|
203 |
+
$migrations = array( 6, 11, 16, 17, 23, 25, 86 );
|
204 |
+
foreach ( $migrations as $migration ) {
|
205 |
+
if ( FrmAppHelper::$db_version >= $migration && $old_db_version < $migration ) {
|
206 |
$function_name = 'migrate_to_' . $migration;
|
207 |
+
$this->$function_name();
|
208 |
+
}
|
209 |
+
}
|
210 |
+
}
|
211 |
|
212 |
public function uninstall() {
|
213 |
if ( ! current_user_can( 'administrator' ) ) {
|
261 |
return true;
|
262 |
}
|
263 |
|
264 |
+
/**
|
265 |
+
* Reverse migration 17 -- Divide by 9
|
266 |
+
* @since 3.0.05
|
267 |
+
*/
|
268 |
+
private function migrate_to_86() {
|
269 |
+
|
270 |
+
$fields = $this->get_fields_with_size();
|
271 |
+
|
272 |
+
foreach ( (array) $fields as $f ) {
|
273 |
+
$f->field_options = maybe_unserialize( $f->field_options );
|
274 |
+
$size = $f->field_options['size'];
|
275 |
+
$this->maybe_convert_migrated_size( $size );
|
276 |
+
|
277 |
+
if ( $size === $f->field_options['size'] ) {
|
278 |
+
continue;
|
279 |
+
}
|
280 |
+
|
281 |
+
$f->field_options['size'] = $size;
|
282 |
+
FrmField::update( $f->id, array( 'field_options' => $f->field_options ) );
|
283 |
+
unset( $f );
|
284 |
+
}
|
285 |
+
|
286 |
+
// reverse the extra size changes in widgets
|
287 |
+
$widgets = get_option( 'widget_frm_show_form' );
|
288 |
+
if ( empty( $widgets ) ) {
|
289 |
+
return;
|
290 |
+
}
|
291 |
+
|
292 |
+
$this->revert_widget_field_size();
|
293 |
+
}
|
294 |
+
|
295 |
+
private function get_fields_with_size() {
|
296 |
+
$field_types = array( 'textarea', 'text', 'number', 'email', 'url', 'rte', 'date', 'phone', 'password', 'image', 'tag', 'file' );
|
297 |
+
$query = array(
|
298 |
+
'type' => $field_types,
|
299 |
+
'field_options like' => 's:4:"size";',
|
300 |
+
'field_options not like' => 's:4:"size";s:0:',
|
301 |
+
);
|
302 |
+
|
303 |
+
return FrmDb::get_results( $this->fields, $query, 'id, field_options' );
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* reverse the extra size changes in widgets
|
308 |
+
* @since 3.0.05
|
309 |
+
*/
|
310 |
+
private function revert_widget_field_size() {
|
311 |
+
$widgets = get_option( 'widget_frm_show_form' );
|
312 |
+
if ( empty( $widgets ) ) {
|
313 |
+
return;
|
314 |
+
}
|
315 |
+
|
316 |
+
$widgets = maybe_unserialize( $widgets );
|
317 |
+
foreach ( $widgets as $k => $widget ) {
|
318 |
+
if ( ! is_array( $widget ) || ! isset( $widget['size'] ) ) {
|
319 |
+
continue;
|
320 |
+
}
|
321 |
+
|
322 |
+
$this->maybe_convert_migrated_size( $widgets[ $k ]['size'] );
|
323 |
+
}
|
324 |
+
update_option( 'widget_frm_show_form', $widgets );
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Divide by 9 to reverse the multiplication
|
329 |
+
* @since 3.0.05
|
330 |
+
*/
|
331 |
+
private function maybe_convert_migrated_size( &$size ) {
|
332 |
+
$has_px_size = ! empty( $size ) && strpos( $size, 'px' );
|
333 |
+
if ( ! $has_px_size ) {
|
334 |
+
return;
|
335 |
+
}
|
336 |
+
|
337 |
+
$int_size = str_replace( 'px', '', $size );
|
338 |
+
if ( ! is_numeric( $int_size ) || (int) $int_size < 900 ) {
|
339 |
+
return;
|
340 |
+
}
|
341 |
+
|
342 |
+
$pixel_conversion = 9;
|
343 |
+
$size = round( (int) $int_size / $pixel_conversion );
|
344 |
+
}
|
345 |
+
|
346 |
/**
|
347 |
* Migrate old styling settings. If sites are using the old
|
348 |
* default 400px field width, switch it to 100%
|
380 |
}
|
381 |
}
|
382 |
|
383 |
+
/**
|
384 |
+
* Change field size from character to pixel -- Multiply by 9
|
385 |
+
*/
|
386 |
+
private function migrate_to_17() {
|
387 |
+
$fields = $this->get_fields_with_size();
|
|
|
388 |
|
389 |
+
foreach ( $fields as $f ) {
|
390 |
+
$f->field_options = maybe_unserialize( $f->field_options );
|
391 |
+
if ( empty( $f->field_options['size'] ) || ! is_numeric( $f->field_options['size'] ) ) {
|
392 |
+
continue;
|
393 |
+
}
|
|
|
|
|
394 |
|
395 |
+
$this->convert_character_to_px( $f->field_options['size'] );
|
|
|
396 |
|
397 |
+
FrmField::update( $f->id, array( 'field_options' => $f->field_options ) );
|
398 |
+
unset( $f );
|
399 |
+
}
|
|
|
|
|
|
|
400 |
|
401 |
+
$this->adjust_widget_size();
|
402 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
|
404 |
+
/**
|
405 |
+
* Change the characters in widgets to pixels
|
406 |
+
*/
|
407 |
+
private function adjust_widget_size() {
|
408 |
+
$widgets = get_option( 'widget_frm_show_form' );
|
409 |
+
if ( empty( $widgets ) ) {
|
410 |
+
return;
|
411 |
+
}
|
412 |
|
413 |
+
$widgets = maybe_unserialize( $widgets );
|
414 |
+
foreach ( $widgets as $k => $widget ) {
|
415 |
+
if ( ! is_array( $widget ) || ! isset( $widget['size'] ) ) {
|
416 |
+
continue;
|
417 |
+
}
|
418 |
+
$this->convert_character_to_px( $widgets[ $k ]['size'] );
|
419 |
+
}
|
420 |
+
update_option( 'widget_frm_show_form', $widgets );
|
421 |
+
}
|
422 |
+
|
423 |
+
private function convert_character_to_px( &$size ) {
|
424 |
+
$pixel_conversion = 9;
|
425 |
+
$size = round( $pixel_conversion * (int) $size );
|
426 |
+
$size .= 'px';
|
427 |
+
}
|
428 |
|
429 |
/**
|
430 |
* Migrate post and email notification settings into actions
|
510 |
}
|
511 |
unset($form);
|
512 |
}
|
|
|
513 |
}
|
514 |
|
515 |
private function migrate_to_6() {
|
550 |
}
|
551 |
unset($default_html, $old_default_html, $fields);
|
552 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
553 |
}
|
classes/views/styles/_sample_form.php
CHANGED
@@ -18,13 +18,13 @@
|
|
18 |
<div class="frm_description"><p><?php esc_html_e( 'This is an example form description for styling purposes.', 'formidable' ) ?></p></div>
|
19 |
|
20 |
<div class="frm_fields_container">
|
21 |
-
<div class="frm_form_field
|
22 |
<label class="frm_primary_label"><?php esc_html_e( 'Text field', 'formidable' ) ?> <span class="frm_required">*</span></label>
|
23 |
<input type="text" value="<?php esc_attr_e( 'This is sample text', 'formidable' ) ?>"/>
|
24 |
<div class="frm_description"><?php esc_html_e( 'A field with a description', 'formidable' ) ?></div>
|
25 |
</div>
|
26 |
|
27 |
-
<div class="frm_form_field form-field
|
28 |
<label for="field_wq7w5e" class="frm_primary_label"><?php esc_html_e( 'Drop-down Select', 'formidable' ) ?></label>
|
29 |
|
30 |
<select name="item_meta[1028]" id="field_wq7w5e" >
|
@@ -33,29 +33,29 @@
|
|
33 |
</select>
|
34 |
</div>
|
35 |
|
36 |
-
<div class="frm_form_field form-field
|
37 |
<label class="frm_primary_label"><?php esc_html_e( 'Text field with error', 'formidable' ) ?> <span class="frm_required">*</span></label>
|
38 |
<input type="text" value="<?php esc_attr_e( 'This is sample text', 'formidable' ) ?>"/>
|
39 |
<div class="frm_error"><?php echo esc_html( $frm_settings->blank_msg ) ?></div>
|
40 |
</div>
|
41 |
|
42 |
-
<div class="frm_form_field
|
43 |
<label class="frm_primary_label"><?php esc_html_e( 'Text field in active state', 'formidable' ) ?> <span class="frm_required">*</span></label>
|
44 |
<input type="text" value="<?php esc_attr_e( 'Active state will be seen when the field is clicked', 'formidable' ) ?>" />
|
45 |
</div>
|
46 |
|
47 |
-
<div class="frm_form_field
|
48 |
<label class="frm_primary_label"><?php esc_html_e( 'Read-only field', 'formidable' ) ?></label>
|
49 |
<input type="text" value="<?php esc_attr_e( 'This field is not editable', 'formidable' ) ?>" disabled="disabled" />
|
50 |
</div>
|
51 |
|
52 |
-
<div class="frm_form_field form-field
|
53 |
<label class="frm_primary_label"><?php esc_html_e( 'Text Area', 'formidable' ) ?></label>
|
54 |
<textarea></textarea>
|
55 |
<div class="frm_description"><?php esc_html_e( 'Another field with a description', 'formidable' ) ?></div>
|
56 |
</div>
|
57 |
|
58 |
-
<div class="frm_form_field form-field
|
59 |
<label class="frm_primary_label"><?php esc_html_e( 'Radio Buttons', 'formidable' ) ?></label>
|
60 |
<div class="frm_opt_container">
|
61 |
<div class="frm_radio"><label><input type="radio" /><?php esc_html_e( 'Option 1', 'formidable' ) ?></label></div>
|
@@ -63,7 +63,7 @@
|
|
63 |
</div>
|
64 |
</div>
|
65 |
|
66 |
-
<div class="frm_form_field form-field
|
67 |
<label class="frm_primary_label"><?php esc_html_e( 'Check Boxes', 'formidable' ) ?></label>
|
68 |
<div class="frm_opt_container">
|
69 |
<div class="frm_checkbox"><label><input type="checkbox" /><?php esc_html_e( 'Option 1', 'formidable' ) ?></label></div>
|
18 |
<div class="frm_description"><p><?php esc_html_e( 'This is an example form description for styling purposes.', 'formidable' ) ?></p></div>
|
19 |
|
20 |
<div class="frm_fields_container">
|
21 |
+
<div class="frm_form_field frm_half frm_first form-field <?php echo esc_attr( $pos_class ) ?>">
|
22 |
<label class="frm_primary_label"><?php esc_html_e( 'Text field', 'formidable' ) ?> <span class="frm_required">*</span></label>
|
23 |
<input type="text" value="<?php esc_attr_e( 'This is sample text', 'formidable' ) ?>"/>
|
24 |
<div class="frm_description"><?php esc_html_e( 'A field with a description', 'formidable' ) ?></div>
|
25 |
</div>
|
26 |
|
27 |
+
<div class="frm_form_field form-field frm_half <?php echo esc_attr( $pos_class ) ?>">
|
28 |
<label for="field_wq7w5e" class="frm_primary_label"><?php esc_html_e( 'Drop-down Select', 'formidable' ) ?></label>
|
29 |
|
30 |
<select name="item_meta[1028]" id="field_wq7w5e" >
|
33 |
</select>
|
34 |
</div>
|
35 |
|
36 |
+
<div class="frm_form_field form-field frm_third frm_first frm_blank_field <?php echo esc_attr( $pos_class ) ?>">
|
37 |
<label class="frm_primary_label"><?php esc_html_e( 'Text field with error', 'formidable' ) ?> <span class="frm_required">*</span></label>
|
38 |
<input type="text" value="<?php esc_attr_e( 'This is sample text', 'formidable' ) ?>"/>
|
39 |
<div class="frm_error"><?php echo esc_html( $frm_settings->blank_msg ) ?></div>
|
40 |
</div>
|
41 |
|
42 |
+
<div class="frm_form_field frm_third form-field frm_focus_field <?php echo esc_attr( $pos_class ) ?>">
|
43 |
<label class="frm_primary_label"><?php esc_html_e( 'Text field in active state', 'formidable' ) ?> <span class="frm_required">*</span></label>
|
44 |
<input type="text" value="<?php esc_attr_e( 'Active state will be seen when the field is clicked', 'formidable' ) ?>" />
|
45 |
</div>
|
46 |
|
47 |
+
<div class="frm_form_field frm_third form-field <?php echo esc_attr( $pos_class ) ?>">
|
48 |
<label class="frm_primary_label"><?php esc_html_e( 'Read-only field', 'formidable' ) ?></label>
|
49 |
<input type="text" value="<?php esc_attr_e( 'This field is not editable', 'formidable' ) ?>" disabled="disabled" />
|
50 |
</div>
|
51 |
|
52 |
+
<div class="frm_form_field form-field frm_half frm_first <?php echo esc_attr( $pos_class ) ?> frm_lite_style">
|
53 |
<label class="frm_primary_label"><?php esc_html_e( 'Text Area', 'formidable' ) ?></label>
|
54 |
<textarea></textarea>
|
55 |
<div class="frm_description"><?php esc_html_e( 'Another field with a description', 'formidable' ) ?></div>
|
56 |
</div>
|
57 |
|
58 |
+
<div class="frm_form_field form-field frm_fourth <?php echo esc_attr( $pos_class ) ?> frm_lite_style">
|
59 |
<label class="frm_primary_label"><?php esc_html_e( 'Radio Buttons', 'formidable' ) ?></label>
|
60 |
<div class="frm_opt_container">
|
61 |
<div class="frm_radio"><label><input type="radio" /><?php esc_html_e( 'Option 1', 'formidable' ) ?></label></div>
|
63 |
</div>
|
64 |
</div>
|
65 |
|
66 |
+
<div class="frm_form_field form-field frm_fourth <?php echo esc_attr( $pos_class ) ?> frm_lite_style">
|
67 |
<label class="frm_primary_label"><?php esc_html_e( 'Check Boxes', 'formidable' ) ?></label>
|
68 |
<div class="frm_opt_container">
|
69 |
<div class="frm_checkbox"><label><input type="checkbox" /><?php esc_html_e( 'Option 1', 'formidable' ) ?></label></div>
|
classes/views/xml/import_form.php
CHANGED
@@ -88,7 +88,7 @@
|
|
88 |
<label><?php esc_html_e( 'Select Form(s)', 'formidable' ); ?></label>
|
89 |
</th>
|
90 |
<td>
|
91 |
-
<select name="frm_export_forms[]" multiple="multiple"
|
92 |
<?php foreach ( $forms as $form ) { ?>
|
93 |
<option value="<?php echo esc_attr( $form->id ) ?>">
|
94 |
<?php
|
88 |
<label><?php esc_html_e( 'Select Form(s)', 'formidable' ); ?></label>
|
89 |
</th>
|
90 |
<td>
|
91 |
+
<select name="frm_export_forms[]" multiple="multiple">
|
92 |
<?php foreach ( $forms as $form ) { ?>
|
93 |
<option value="<?php echo esc_attr( $form->id ) ?>">
|
94 |
<?php
|
css/frm_admin.css
CHANGED
@@ -293,6 +293,7 @@ ul.frm_form_nav > li{
|
|
293 |
#postbox-container-1 .frm_field_list #frm-insert-fields{
|
294 |
max-height: none;
|
295 |
font-size:14px;
|
|
|
296 |
}
|
297 |
#postbox-container-1 .frm_field_list #frm-layout-classes,
|
298 |
#postbox-container-1 .frm_field_list #frm-dynamic-values{
|
293 |
#postbox-container-1 .frm_field_list #frm-insert-fields{
|
294 |
max-height: none;
|
295 |
font-size:14px;
|
296 |
+
padding-bottom:25px;
|
297 |
}
|
298 |
#postbox-container-1 .frm_field_list #frm-layout-classes,
|
299 |
#postbox-container-1 .frm_field_list #frm-dynamic-values{
|
css/frm_old_grids.css
CHANGED
@@ -2,6 +2,13 @@
|
|
2 |
clear:both;
|
3 |
}
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
.frm_inline_form .frm_form_field.form-field{
|
6 |
margin-right:2.5%;
|
7 |
display:inline-block;
|
2 |
clear:both;
|
3 |
}
|
4 |
|
5 |
+
.frm_form_field,
|
6 |
+
.frm_form_field.frm_inline_container,
|
7 |
+
.frm_form_field.frm_right_container,
|
8 |
+
.frm_form_field.frm_left_container{
|
9 |
+
width:auto;
|
10 |
+
}
|
11 |
+
|
12 |
.frm_inline_form .frm_form_field.form-field{
|
13 |
margin-right:2.5%;
|
14 |
display:inline-block;
|
formidable.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Formidable Forms
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
-
Version: 3.0.
|
6 |
Plugin URI: https://formidableforms.com/
|
7 |
Author URI: https://formidableforms.com/
|
8 |
Author: Strategy11
|
2 |
/*
|
3 |
Plugin Name: Formidable Forms
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
+
Version: 3.0.05
|
6 |
Plugin URI: https://formidableforms.com/
|
7 |
Author URI: https://formidableforms.com/
|
8 |
Author: Strategy11
|
js/formidable_admin.js
CHANGED
@@ -87,7 +87,7 @@ function frmAdminBuildJS(){
|
|
87 |
var startPos = document.getElementById('frm_set_height_ele').getBoundingClientRect().top;
|
88 |
var topSidebar = document.getElementById('frm-fixed').getBoundingClientRect().top;
|
89 |
var totalHeight = window.innerHeight;
|
90 |
-
fixedBox.style.maxHeight = ( totalHeight - ( startPos - topSidebar ) -
|
91 |
}
|
92 |
}
|
93 |
|
87 |
var startPos = document.getElementById('frm_set_height_ele').getBoundingClientRect().top;
|
88 |
var topSidebar = document.getElementById('frm-fixed').getBoundingClientRect().top;
|
89 |
var totalHeight = window.innerHeight;
|
90 |
+
fixedBox.style.maxHeight = ( totalHeight - ( startPos - topSidebar ) - 30 ) +'px';
|
91 |
}
|
92 |
}
|
93 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: contact form, form builder, custom form, forms, form, form maker, form cre
|
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 3.0.
|
8 |
|
9 |
The best WordPress form plugin for contact forms, surveys and more. Make forms a breeze with a drag and drop form builder and form style generator.
|
10 |
|
@@ -159,6 +159,14 @@ The field and form names and descriptions are all changed with in-place edit. Ju
|
|
159 |
[See more FAQs](https://formidableforms.com/formidable-faqs/ "Formidable Form FAQs")
|
160 |
|
161 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
= 3.0.04 =
|
163 |
* Fix required validation: URL and number fields were requiring a value when the field was not required
|
164 |
* Fix double recaptcha validation which was causing it to fail validation
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 3.0.05
|
8 |
|
9 |
The best WordPress form plugin for contact forms, surveys and more. Make forms a breeze with a drag and drop form builder and form style generator.
|
10 |
|
159 |
[See more FAQs](https://formidableforms.com/formidable-faqs/ "Formidable Form FAQs")
|
160 |
|
161 |
== Changelog ==
|
162 |
+
= 3.0.05 =
|
163 |
+
* Fix: The visual form styler didn't look good when CSS grids were turned off
|
164 |
+
* Fix: Prevent past database migrations from being run again. This was making some field sizes much larger.
|
165 |
+
* Fix: If field sizes are extra long, reverse them because it most likely happened in the last release.
|
166 |
+
* Fix: Sort by a number field on the entries page was ordering by text instead of number
|
167 |
+
* Fix: The export page was showing weird styling for the form selector on some sites
|
168 |
+
* Fix: If CSS grids are off, don't force the width to 100% for form fields like before
|
169 |
+
|
170 |
= 3.0.04 =
|
171 |
* Fix required validation: URL and number fields were requiring a value when the field was not required
|
172 |
* Fix double recaptcha validation which was causing it to fail validation
|