Server IP : 172.67.216.182 / Your IP : 162.158.163.122 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/coircraft.com/wp-content/plugins/caldera-forms/fields/button/ |
Upload File : |
<?php $btnType = $field['config']['type']; $btn_action = null; $attrs = array( 'class' => $field[ 'config' ][ 'class' ], 'type' => $btnType, 'name' => $field_name, 'id' => $field_id, 'value' => $field[ 'label' ], 'data-field' => $field_base_id, ); if($field['config']['type'] == 'next' || $field['config']['type'] == 'prev'){ $btnType = 'button'; $attrs[ 'data-page' ] = $field['config']['type']; $field[ 'config' ][ 'class' ] = $field[ 'config' ][ 'class' ] . ' cf-page-btn cf-page-btn-' . $field[ 'config' ][ 'type' ]; }elseif( 'button' == $field['config']['type' ] ){ $btnType = 'button'; if( !empty( $field['config']['target'] ) ){ $field['config']['class'] .= ' cf-form-trigger'; $attrs[ 'data-target' ] = esc_attr( $field['config']['target'] ); } }elseif( 'reset' == $field['config']['type'] ){ $btnType = 'reset'; }else{ $btnType = 'submit'; } if ( ! empty( $field[ 'config' ][ 'class' ] ) ) { $attrs[ 'class' ] = $field[ 'config' ][ 'class' ]; } $attrs[ 'type' ] = $btnType; $attr_string_button = caldera_forms_field_attributes( $attrs, $field, $form ); $attrs = array( 'class' => 'button_trigger_' . Caldera_Forms_Render_Util::get_current_form_count(), 'type' => 'hidden', 'name' => $field_name, 'id' => $field_id . '_btn', 'value' => $field_value, 'data-field' => $field_base_id, ); $attr_string_hidden_field = caldera_forms_implode_field_attributes( caldera_forms_escape_field_attributes_array( $attrs ) ); ?> <?php echo $wrapper_before; ?> <?php if ( ! empty( $field[ 'config' ][ 'label_space' ] ) ) { ?> <label class="control-label"> </label> <?php } ?> <?php echo $field_before; ?> <input <?php echo $attr_string_button . ' ' . $field_structure[ 'aria' ]; ?>> <?php echo $field_after; ?> <?php echo $wrapper_after; ?> <input <?php echo $attr_string_hidden_field; ?> /> <?php ob_start(); ?> <script> window.addEventListener("load", function(){ jQuery(document).on('click dblclick', '#<?php echo $field_id; ?>', function( e ){ jQuery('#<?php echo $field_id; ?>_btn').val( e.type ).trigger('change'); }); }); </script> <?php $script_template = ob_get_clean(); Caldera_Forms_Render_Util::add_inline_data( $script_template, $form );