AAAAPK>\=%dynamic_dropdown.ctpnuW+A
Dynamic Dropdown
Header(array('settings' => 'Settings', 'help' => 'Help'), 'dynamic_dropdown_config_{n}'); ?> tabStart('settings'); ?> input('action_dynamic_dropdown_{n}_action_label_config', array('type' => 'text', 'label' => "Action Label", 'class' => 'medium_input', 'smalldesc' => 'Label for your action in the wizard.')); ?> input('action_dynamic_dropdown_{n}_source_dropdown_id_config', array('type' => 'text', 'label' => "Source Dropdown ID", 'class' => 'medium_input', 'smalldesc' => "The field id of the select box which will control the data in the target select box.")); ?> input('action_dynamic_dropdown_{n}_target_dropdown_id_config', array('type' => 'text', 'label' => "Target Dropdown ID", 'class' => 'medium_input', 'smalldesc' => "The field id of the select box which will have the dynamic content/options.")); ?> input('action_dynamic_dropdown_{n}_enable_ajax_config', array('type' => 'select', 'label' => 'Use AJAX ?', 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => 'Use AJAX, enable this if your target dropdown details are stored on database or if you need to generate them using some PHP.')); ?> input('action_dynamic_dropdown_{n}_ajax_event_name_config', array('type' => 'text', 'label' => "AJAX Event name", 'class' => 'medium_input', 'smalldesc' => "The form event name which will be queried using the AJAX call.")); ?> input('action_dynamic_dropdown_{n}_content1_config', array('type' => 'textarea', 'label' => "Extra options extension", 'rows' => 20, 'cols' => 70, 'smalldesc' => "The static values of both the source and the target dropdowns, in multi line format, Please check the help tab for an example.")); ?> tabEnd(); ?> tabStart('help'); ?>

tabEnd(); ?>
PK>\4dynamic_dropdown.phpnuW+A 'Dynamic Dropdown', 'tooltip' => 'Attach one of your Drop Downs to another dropdown or to an AJAX event so that the data is changed dynamically.'); var $group = array('id' => 'power_fields', 'title' => 'Power Fields'); function load($clear){ if($clear){ $action_params = array( 'target_dropdown_id' => '', 'source_dropdown_id' => '', 'enable_ajax' => 0, 'ajax_event_name' => '', 'action_label' => '', 'content1' => '', ); } return array('action_params' => $action_params); } function run($form, $actiondata){ } } ?>PK>\) .htaccessnuW+A Order allow,deny Deny from all PK>\+%cfaction_dynamic_dropdown.phpnuW+Aparams); $document = JFactory::getDocument(); JHTML::_('behavior.mootools'); $mainframe = JFactory::getApplication(); $uri = JFactory::getURI(); $dynamic_values = array(); if(!empty($actiondata->content1)){ $config = trim($actiondata->content1); $values = explode("\n", $config); foreach($values as $line){ $line_data = explode(":", trim($line)); $source_value = $line_data[0]; $target_data = $line_data[1]; $target_options = explode(",", $target_data); foreach($target_options as $target_option){ $target_option_data = explode("=", $target_option); $target_option_value = $target_option_data[0]; $dynamic_values[$source_value][$target_option_value] = $target_option_title = trim($target_option_data[1]); } } } $source_id = $params->get('source_dropdown_id', ''); $target_id = $params->get('target_dropdown_id', ''); if(((bool)$params->get('enable_ajax', 0) === true && empty($dynamic_values)) || empty($source_id) || empty($target_id)){ return false; } ob_start(); ?> window.addEvent('load', function() { $('').addEvent('change', function(){ get('enable_ajax', 0) === false): ?> $dynamic_value): ?> if($('').get('value') == ''){ $('').empty(); $option_title): ?> new Element('option', {'value': '', 'text': ''}).inject($('')); $('').fireEvent('change'); } var load_req = new Request({ url: 'index.php?option=com_chronoforms&chronoform=form_name; ?>&event=get('ajax_event_name', ''); ?>', method: 'get', onRequest: function(){ $('').empty(); new Element('option', {'value': '', 'text': 'Loading...'}).inject($('')); }, onSuccess: function(responseText){ $('').empty(); var response_data = responseText.trim().split("\n"); response_data.each(function(line){ var line_data = line.split("="); new Element('option', {'value': line_data[0], 'text': line_data[1]}).inject($('')); }); $('').fireEvent('change'); }, onFailure: function(){ $('').empty(); new Element('option', {'value': '', 'text': 'Loading failed.'}).inject($('')); } }); load_req.send($('').get('name')+'='+$('').get('value')); }); }); form_params->get('dynamic_files', 0) === false){ $document->addScriptDeclaration("//"); }else{ //load the action class $form->loadActionHelper('load_js'); $CfactionLoadJsHelper = new CfactionLoadJsHelper(); $JSactiondata = new stdClass(); $JSactiondata->content1 = $script; $JSParams = new JParameter(''); $JSParams->set('dynamic_file', $form->form_params->get('dynamic_files', 0)); $JSactiondata->params = $JSParams->toString(); $CfactionLoadJsHelper->load($form, $JSactiondata); } } } ?>PK>\  index.htmlnuW+A PK>\tōcfaction_dynamic_dropdown.ctpnuW+Aload($form, $actiondata); ?>PK>\=%dynamic_dropdown.ctpnuW+APK>\4dynamic_dropdown.phpnuW+APK>\) .htaccessnuW+APK>\+%cfaction_dynamic_dropdown.phpnuW+APK>\  'index.htmlnuW+APK>\tō'cfaction_dynamic_dropdown.ctpnuW+APK(