AAAAPK ¼ B\Ù½®‚ ‚
show_html.phpnu W+A„¶ 'Show HTML (Display Form)', 'tooltip' => 'Eval and show the form content.');
function load($clear){
if($clear){
$action_params = array(
'data_republish' => 1,
'display_errors' => 1,
'load_token' => 1,
'keep_alive' => 0,
'curly_replacer' => 1,
'submit_event' => 'submit',
'form_container' => '',
'page_number' => '1'
);
}
return array('action_params' => $action_params);
}
function run($form, $actiondata){
$params = new JParameter($actiondata->params);
}
}
?>PK ¼ B\d ¶q{ { cfaction_show_html.ctpnu W+A„¶ loadAction($form, $actiondata);
?>PK ¼ B\žÙÜ
index.htmlnu W+A„¶
PK ¼ B\sÒ/ /
show_html.ctpnu W+A„¶
Show html
Header(array('general' => 'General', 'multi_page' => 'Advanced (Multi Page)'), 'cfaction_show_html_element_config_{n}'); ?>
tabStart('general'); ?>
input('action_show_html_{n}_data_republish_config', array('type' => 'select', 'label' => 'Republish form data', 'options' => array(0 => 'No', 1 => 'Yes (recommended)'), 'smalldesc' => 'Try to republish the form data in case the form has been reloaded because of some error.')); ?>
input('action_show_html_{n}_display_errors_config', array('type' => 'select', 'label' => 'Display Fields Errors', 'options' => array(0 => 'No', 1 => 'Yes (recommended)'), 'smalldesc' => 'Display server side errors below fields, for this to work you need to have this code in the place you want the error to appear at: <div id="error-message-FIELD_NAME_HERE"></div>
*This is added automatically when using the wizard.')); ?>
input('action_show_html_{n}_load_token_config', array('type' => 'select', 'label' => 'Load Security Token', 'options' => array(0 => 'No', 1 => 'Yes (recommended)'), 'smalldesc' => 'Do you want to load the security token ? this is used to verify that form code has not been changed by the user before submission, you need to have the "Check Token" action to check it.')); ?>
input('action_show_html_{n}_keep_alive_config', array('type' => 'select', 'label' => 'Load Keep Alive', 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => 'Load the keep alive element ? this will ensure that the user session does not expire while having the form opened.')); ?>
input('action_show_html_{n}_curly_replacer_config', array('type' => 'select', 'label' => 'Curly brackets replacer', 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => 'Replace any fields names inside curly brackets, this will work only if you have some data in the $form->data array.')); ?>
tabEnd(); ?>
tabStart('multi_page'); ?>
input('action_show_html_{n}_submit_event_config', array('type' => 'select', 'label' => 'Submission Event', 'options' => array('_self' => 'Self', 'load' => 'load', 'submit' => 'submit'), 'smalldesc' => 'Choose the event which will be executed when the form is submitted.')); ?>
input('action_show_html_{n}_page_number_config', array('type' => 'text', 'label' => 'Page Number', 'smalldesc' => 'Enter the page number to show in case you have more than 1 page in your form or leave it as its (1).')); ?>
input('action_show_html_{n}_form_container_config', array('type' => 'text', 'label' => 'Div container id', 'smalldesc' => 'Enter an id and it will be assigned to a div element wrapping the form element in the page.')); ?>
tabEnd(); ?>
PK ¼ B\÷ƲÎ8U 8U cfaction_show_html.phpnu W+A„¶ params);
$output = '';
$mainframe = JFactory::getApplication();
$uri = JFactory::getURI();
$document = JFactory::getDocument();
//set form's HTML name and ID
$form->html_form_name = isset($form->html_form_name) ? $form->html_form_name : $form->form_params->get('html_form_name', $form->form_name);
$form->html_form_id = isset($form->html_form_id) ? $form->html_form_id : $form->form_params->get('html_form_id', 'chronoform_'.$form->form_name);
//check the assets files to be loaded
if((int)$form->form_params->get('load_files', 1) > 0){
//load form css files
if((bool)$form->form_params->get('tight_layout', 0) === false){
$document->addStyleSheet($uri->root().'components/com_chronoforms/css/frontforms.css');
}else{
$document->addStyleSheet($uri->root().'components/com_chronoforms/css/frontforms_tight.css');
}
}
if(($form->form_params->get('enable_jsvalidation', 1) || (strpos($form->form_details->content, 'validate[') !== false && $form->form_params->get('auto_detect_settings', 1))) && (int)$form->form_params->get('load_files', 1) > 0){
//load js validation code
$this->_loadValidationScripts($form);
}
$datetime_picker_selector = $form->form_params->get('datepicker_config', '');
if((!empty($datetime_picker_selector) || strpos($form->form_details->content, 'cf_date_picker') !== false || strpos($form->form_details->content, 'cf_time_picker') !== false || strpos($form->form_details->content, 'cf_datetime_picker') !== false) && (int)$form->form_params->get('load_files', 1) > 0){
//load js for the date time picker
$jversion = new JVersion();
if(($jversion->RELEASE > 1.5) && $form->form_params->get('datepicker_type', 0) == 1){
$this->_loadDatePickerScripts_moo($form);
}else{
$this->_loadDatePickerScripts($form);
}
}
if((strpos($form->form_details->content, 'tooltipimg') !== false) && (int)$form->form_params->get('load_files', 1) > 0){
//load the tooltips files
$this->_loadToolTip($form);
}
if(!empty($form->validation_errors) && (int)$form->form_params->get('load_files', 1) > 0){
//add the validation style
$this->_loadSSValidation($form);
}
//check if form tags should be added or not
if($form->form_params->get('add_form_tags', 1)){
$output .= "";
}
//check if the form should be inside a div container ?
if(strlen(trim($params->get('form_container', ''))) > 0){
$output = '