Server IP : 104.21.38.3 / Your IP : 172.68.164.72 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/ui/panels/ |
Upload File : |
<?php if(!isset($element['variables'])){ $element['variables'] = array(); } ?> <div class="caldera-config-group"> <label><?php echo __('Name'); ?></label> <div class="caldera-config-field" style="margin: 0px; padding: 4px 0px; width: 401px;"> <div><?php echo __('Value', 'caldera-forms'); ?></div> </div> <?php echo __('Behaviour', 'caldera-forms'); ?> </div> <div id="variable_entry_list_none" <?php if(!empty($element['variables'])){ echo 'style="display:none;"'; } ?>><p class="description"><?php echo __('No variables defined', 'caldera-forms'); ?></p></div> <div id="variable_entry_list"> <?php if(!empty($element['variables']['keys'])){ foreach($element['variables']['keys'] as $var_index=>$var_value){ ?> <div class="caldera-config-group"> <label style="padding:2px 0;"><input type="text" class="block-input field-config set-system-variable" name="config[variables][keys][]" value="<?php echo $var_value; ?>"></label> <div class="caldera-config-field" style="width:400px;"> <input type="text" class="field-config var-value block-input magic-tag-enabled" name="config[variables][values][]" value="<?php echo $element['variables']['values'][$var_index]; ?>"> </div> <select name="config[variables][types][]" class="field-config" style="vertical-align: baseline;"> <option value="static" <?php if( $element['variables']['types'][$var_index] == 'static'){ echo 'selected="selected"'; } ?>><?php echo __('Static', 'caldera-forms'); ?></option> <option value="passback" <?php if( $element['variables']['types'][$var_index] == 'passback'){ echo 'selected="selected"'; } ?>><?php echo __('Passback', 'caldera-forms'); ?></option> <option value="entryitem" <?php if( $element['variables']['types'][$var_index] == 'entryitem'){ echo 'selected="selected"'; } ?>><?php echo __('Entry List', 'caldera-forms'); ?></option> </select> <button type="button" class="button remove-this-variable">×</button> </div> <?php } } ?> </div> <?php do_action( 'caldera_forms_variables_config', $element ); ?> <script type="text/html" id="variable-fields-tmpl"> <div class="caldera-config-group"> <label style="padding:2px 0;"><input type="text" class="block-input field-config set-system-variable" name="config[variables][keys][]" value=""></label> <div class="caldera-config-field" style="width:400px;"> <input type="text" class="field-config var-value block-input magic-tag-enabled" name="config[variables][values][]" value=""> </div> <select name="config[variables][types][]" class="field-config" style="vertical-align: baseline;"> <option value="static"><?php echo __('Static', 'caldera-forms'); ?></option> <option value="passback"><?php echo __('Passback', 'caldera-forms'); ?></option> <option value="entryitem"><?php echo __('Entry List', 'caldera-forms'); ?></option> </select> <button type="button" class="button remove-this-variable">×</button> </div> </script> <script> jQuery(document).on('click', '.remove-this-variable', function(){ jQuery(this).closest('.caldera-config-group').remove(); jQuery('.set-system-variable').trigger('change'); if(!jQuery('#variable_entry_list').children().length){ jQuery('#variable_entry_list_none').show(); } }); jQuery(document).on('click', '.caldera-add-variable', function(e){ e.preventDefault(); jQuery('#variable_entry_list_none').hide(); jQuery('#variable_entry_list').append( jQuery('#variable-fields-tmpl').html() ); rebind_field_bindings(); }); //Add the variable to the list of magic tags on variable creation jQuery(document).on('change', '.set-system-variable', function(){ cf_set_system_variable(); }); //Add the variable to the list of magic tags on page load jQuery(document).ready( function(){ cf_set_system_variable(); }); // Function that adds the variables to the magic tags list function cf_set_system_variable() { //set-system-variable var variables = jQuery('.set-system-variable'); if(!variables.length){ system_values.variable = null; return; } // set object system_values.variable = { tags : { vars : [] }, type : "<?php echo __('Variables', 'caldera-forms'); ?>", wrap : ['{','}'] }; // add values for(var v = 0; v < variables.length; v++){ if(variables[v].value.length){ variables[v].value = variables[v].value.replace(/[^a-z0-9]/gi, '_').toLowerCase(); system_values.variable.tags.vars.push( 'variable:' + variables[v].value ); jQuery(variables[v]).closest('.caldera-config-group').find('.var-value').data('parent', variables[v].value); } } } </script>