PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/helpers/FrmOnSubmitHelper.php +15 -12 6.26 → trunk View file →
@@ -29,10 +29,11 @@
29 29 * @return void
30 30 */
31 31 public static function show_message_settings( $args ) {
32 32 $id_attr = $args['action_control']->get_field_id( 'success_msg' );
33 + // phpcs:disable Generic.WhiteSpace.ScopeIndent
33 34 ?>
34 - <div class="frm_form_field frm_has_shortcodes">
35 + <div class="frm_form_field frm_has_shortcodes frm-mt-sm">
35 36 <label for="<?php echo esc_attr( $id_attr ); ?>" class="screen-reader-text">
36 37 <?php esc_html_e( 'Message on submit', 'formidable' ); ?>
37 38 </label>
38 39
@@ -52,9 +53,9 @@
52 53 <?php
53 54 $id_attr = $args['action_control']->get_field_id( 'show_form' );
54 55 $name_attr = $args['action_control']->get_field_name( 'show_form' );
55 56 ?>
56 - <div class="frm_form_field">
57 + <div class="frm_form_field frm-h-stack-xs">
57 58 <?php
58 59 FrmHtmlHelper::toggle(
59 60 $id_attr,
60 61 $name_attr,
@@ -69,8 +70,9 @@
69 70 <?php esc_html_e( 'Show the form with the confirmation message', 'formidable' ); ?>
70 71 </label>
71 72 </div>
72 73 <?php
74 + // phpcs:enable Generic.WhiteSpace.ScopeIndent
73 75 }
74 76
75 77 /**
76 78 * Shows redirect settings.
@@ -107,11 +109,12 @@
107 109 * @return void
108 110 */
109 111 public static function show_page_settings( $args ) {
110 112 $name_attr = $args['action_control']->get_field_name( 'success_page_id' );
113 + // phpcs:disable Generic.WhiteSpace.ScopeIndent
111 114 ?>
112 - <div class="frm_form_field">
113 - <div class="frm_note_style">
115 + <div class="frm_form_field frm-mt-xs">
116 + <div class="frm_note_style frm-mt-0 frm-mb-md">
114 117 <?php esc_html_e( 'NOTE: The selected page content will be displayed, but the full page will not be loaded. Traditional URL tracking in Google Analytics and similar tools won\'t register a page load event. If precise tracking is essential, consider using the \'Redirect to URL\' option.', 'formidable' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
115 118 </div>
116 119 <label for="<?php echo esc_attr( $name_attr ); ?>" class="screen-reader-text">
117 120 <?php esc_html_e( 'Select a page', 'formidable' ); ?>
@@ -126,8 +129,9 @@
126 129 );
127 130 ?>
128 131 </div>
129 132 <?php
133 + // phpcs:enable Generic.WhiteSpace.ScopeIndent
130 134 }
131 135
132 136 /**
133 137 * Gets all active On Submit form actions for form.
@@ -228,9 +232,9 @@
228 232 self::populate_on_submit_data( $form_options, $first_edit_action, 'update' );
229 233 }
230 234 }
231 235
232 - if ( ! empty( $form_options ) ) {
236 + if ( $form_options ) {
233 237 $_POST['options'] += $form_options;
234 238 }
235 239 }
236 240
@@ -236,11 +240,11 @@
236 240
237 241 /**
238 242 * Populates the On Submit data to form options.
239 243 *
240 - * @param array $form_options Form options.
241 - * @param object $action Optional. The On Submit action object.
242 - * @param string $event Form event. Default is `create`.
244 + * @param array $form_options Form options.
245 + * @param object|null $action Optional. The On Submit action object.
246 + * @param string $event Form event. Default is `create`.
243 247 *
244 248 * @return void
245 249 */
246 250 public static function populate_on_submit_data( &$form_options, $action = null, $event = 'create' ) {
@@ -302,9 +306,9 @@
302 306
303 307 // Check if form already has form actions to avoid creating duplicates.
304 308 $has_actions = FrmFormAction::form_has_action_type( $form_id, $action_type );
305 309
306 - if ( ! empty( $has_actions ) ) {
310 + if ( $has_actions ) {
307 311 // Don't migrate again.
308 312 self::save_migrated_success_actions( $form );
309 313 return;
310 314 }
@@ -421,10 +425,9 @@
421 425 *
422 426 * @return object
423 427 */
424 428 public static function get_fallback_action( $event = 'create' ) {
425 - $action = new stdClass();
426 -
429 + $action = new stdClass();
427 430 $default_msg = self::get_default_msg();
428 431
429 432 if ( current_user_can( 'frm_edit_forms' ) ) {
430 433 $default_msg .= '<br />';
@@ -463,9 +466,9 @@
463 466 * Check if the current event has been passed. If not, use create actions.
464 467 *
465 468 * @since 6.1.1
466 469 *
467 - * @param array $atts
470 + * @param array $atts
468 471 *
469 472 * @return string
470 473 */
471 474 public static function current_event( $atts ) {