| Server IP : 192.241.186.36 / Your IP : 216.73.216.164 Web Server : Apache/2.4.29 (Ubuntu) System : Linux webserver7 4.15.0-194-generic #205-Ubuntu SMP Fri Sep 16 19:49:27 UTC 2022 x86_64 User : root ( 0) PHP Version : 7.4.32 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/pushyard/wp-content/plugins/formidable/classes/models/ |
Upload File : |
<?php
/**
* On Submit form action
*
* @package Formidable
* @since 6.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'You are not allowed to call this page directly.' );
}
class FrmOnSubmitAction extends FrmFormAction {
public static $slug = 'on_submit';
public function __construct() {
$action_ops = array(
'classes' => 'frm_icon_font frm_checkmark_icon',
'active' => true,
'event' => array( 'create' ),
'limit' => 99,
'priority' => 9,
'color' => 'rgb(66, 193, 178)',
'keywords' => __( 'redirect, success, confirmation, submit', 'formidable' ),
);
$action_ops = apply_filters( 'frm_' . self::$slug . '_control_settings', $action_ops );
$this->maybe_save_edit_trigger( $action_ops );
parent::__construct( self::$slug, self::get_name(), $action_ops );
}
/**
* @return string
*/
public static function get_name() {
return __( 'Confirmation', 'formidable' );
}
/**
* @return void
*/
public function form( $instance, $args = array() ) {
include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/on_submit_settings.php';
}
public function get_defaults() {
return array(
'success_action' => FrmOnSubmitHelper::get_default_action_type(),
'success_msg' => FrmOnSubmitHelper::get_default_msg(),
'show_form' => '',
'success_url' => '',
'success_page_id' => '',
);
}
/**
* Add a workaround in case Pro hasn't been updated. We don't want to
* lose the trigger and have edit messages start showing on create.
*
* @param array $action_ops The action setup details.
*
* @return void
*/
protected function maybe_save_edit_trigger( &$action_ops ) {
if ( $action_ops['event'] === array( 'create' ) && FrmAppHelper::pro_is_installed() ) {
$action_ops['event'][] = 'update';
}
}
}