AAAAwww/administrator/components/com_chronoforms/form_actions/dynamic_dropdown/dynamic_dropdown.ctp 0000604 00000011236 15137511764 0032476 0 ustar 00 home/academiac
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'); ?>
- Enter the IDs of both the source and target dropdowns.
- Configure the static options string data.
- The options string should be in multi line format, each line will has 1 source value and multiple target values, example:
source_value_1:target_value_1=Target Title 1,target_value_2=Target Title 2
source_value_2:target_value_3=Target Title 3,target_value_4=Target Title 4
- You may enable the AJAX and enter a new event name, make sure this event is added to the form itself, example: ajax
- The new event output should be in multi line format, example:
value1=Title 1
value2=Title 2
value3=Title 3
- Make sure you add the PHP code below to the end of your output code in the AJAX event so that you may get a a clean response:
$mainframe = JFactory::getApplication();
$mainframe->close();
tabEnd(); ?>