PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.5.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.5.1
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
formidable / classes / views / frm-form-actions / form_action.php

form_action.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.5.1, at classes/views/frm-form-actions/form_action.php

76 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 $a = FrmAppHelper::simple_get( 't', 'sanitize_title', 'advanced_settings' );
7
8 $form_action = apply_filters( 'frm_form_action_settings', $form_action, $form_action->post_excerpt );
9 $form_action = apply_filters( 'frm_form_' . $form_action->post_excerpt . '_action_settings', $form_action );
10
11 $data_attrs = array(
12 'data-actionkey' => $action_key,
13 );
14
15 if ( FrmOnSubmitAction::$slug === $form_action->post_excerpt ) {
16 $data_attrs['data-on-submit-type'] = FrmOnSubmitHelper::get_action_type( $form_action );
17 }
18 ?>
19 <div
20 id="frm_form_action_<?php echo esc_attr( $action_key ); ?>"
21 class="widget frm_form_action_settings frm_single_<?php echo esc_attr( $form_action->post_excerpt ); ?>_settings <?php echo esc_attr( $form_action->post_status === 'publish' ? '' : 'frm_disabled_action' ); ?>"
22 <?php FrmAppHelper::array_to_html_params( $data_attrs, true ); ?>
23 >
24 <div class="widget-top">
25 <div class="widget-title-action">
26 <button type="button" class="widget-action hide-if-no-js" aria-expanded="false">
27 <i class="frm_icon_font frm_arrow_right_icon" aria-hidden="true"></i>
28 </button>
29 </div>
30 <span class="frm_email_icons alignright">
31 <?php if ( $action_control->action_options['limit'] > 2 ) { ?>
32 <a href="javascript:void(0)" class="frm_duplicate_form_action" title="<?php esc_attr_e( 'Duplicate', 'formidable' ); ?>">
33 <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_clone_icon' ); ?>
34 </a>
35 <?php } ?>
36 <a href="javascript:void(0)" data-removeid="frm_form_action_<?php echo esc_attr( $action_key ); ?>" class="frm_remove_form_action" data-frmverify="<?php esc_attr_e( 'Delete this form action?', 'formidable' ); ?>" data-frmverify-btn="frm-button-red" title="<?php esc_attr_e( 'Delete', 'formidable' ); ?>">
37 <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_delete_icon ' ); ?>
38 </a>
39
40 <?php
41 FrmHtmlHelper::toggle(
42 $action_control->get_field_id( 'post_status', '' ),
43 $action_control->get_field_name( 'post_status', '' ),
44 array(
45 'checked' => $form_action->post_status === 'publish',
46 'on_label' => 'publish',
47 'off_label' => 'OFF',
48 'show_labels' => false,
49 'echo' => true,
50 )
51 );
52 ?>
53 </span>
54 <div class="widget-title">
55 <h4>
56 <span class="frm_form_action_icon frm-outer-circle <?php echo esc_attr( strpos( $action_control->action_options['classes'], 'frm-inverse' ) === false ? '' : ' frm-inverse' ); ?>">
57 <?php FrmAppHelper::icon_by_class( $action_control->action_options['classes'] ); ?>
58 </span>
59 <?php echo esc_html( $form_action->post_title ); ?>
60 </h4>
61 </div>
62 </div>
63 <div class="widget-inside">
64 <?php
65 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
66 // only load settings if they are just added or are open
67 include( dirname( __FILE__ ) . '/_action_inside.php' );
68 } else {
69 // include hidden settings so action won't get lost on update
70 ?>
71 <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'post_excerpt', '' ) ); ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" />
72 <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ); ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" />
73 <?php } ?>
74 </div>
75 </div>
76