AAAAhome/academiac/www/administrator/components/com_chronoforms/form_elements/input_select.ctp 0000604 00000024766 15137501037 0026533 0 ustar 00
Drop Down
0){
$temp_options = explode("\n", $element_params['options']);
$element_params['options'] = array();
foreach($temp_options as $temp_option){
$temp_option_details = explode('=', $temp_option);
$element_params['options'][strval($temp_option_details[0])] = trim($temp_option_details[1]);
}
}else{
$element_params['options'] = array();
}
?>
$select_option_text){
if(!empty($options)){
$options .= "\n";
}
$options .= $select_option_value.'='.$select_option_text;
}
?>
input('chronofield[{n}][input_select_{n}_input_id]', array('type' => 'hidden', 'id' => 'input_select_{n}_input_id', 'value' => $element_params['input_id'])); ?>
input('chronofield[{n}][input_select_{n}_label_text]', array('type' => 'hidden', 'id' => 'input_select_{n}_label_text', 'value' => $element_params['label_text'])); ?>
input('chronofield[{n}][input_select_{n}_input_name]', array('type' => 'hidden', 'id' => 'input_select_{n}_input_name', 'value' => $element_params['input_name'])); ?>
input('chronofield[{n}][input_select_{n}_size]', array('type' => 'hidden', 'id' => 'input_select_{n}_size', 'value' => $element_params['size'])); ?>
input('chronofield[{n}][input_select_{n}_input_class]', array('type' => 'hidden', 'id' => 'input_select_{n}_input_class', 'value' => $element_params['input_class'])); ?>
input('chronofield[{n}][input_select_{n}_input_title]', array('type' => 'hidden', 'id' => 'input_select_{n}_input_title', 'value' => $element_params['input_title'])); ?>
input('chronofield[{n}][input_select_{n}_label_over]', array('type' => 'hidden', 'id' => 'input_select_{n}_label_over', 'value' => $element_params['label_over'])); ?>
input('chronofield[{n}][input_select_{n}_hide_label]', array('type' => 'hidden', 'id' => 'input_select_{n}_hide_label', 'value' => $element_params['hide_label'])); ?>
input('chronofield[{n}][input_select_{n}_selected]', array('type' => 'hidden', 'id' => 'input_select_{n}_selected', 'value' => $element_params['selected'])); ?>
input('chronofield[{n}][input_select_{n}_showempty]', array('type' => 'hidden', 'id' => 'input_select_{n}_showempty', 'value' => $element_params['showempty'])); ?>
input('chronofield[{n}][input_select_{n}_multiple]', array('type' => 'hidden', 'id' => 'input_select_{n}_multiple', 'value' => $element_params['multiple'])); ?>
input('chronofield[{n}][input_select_{n}_multiline_start]', array('type' => 'hidden', 'id' => 'input_select_{n}_multiline_start', 'value' => $element_params['multiline_start'])); ?>
input('chronofield[{n}][input_select_{n}_multiline_add]', array('type' => 'hidden', 'id' => 'input_select_{n}_multiline_add', 'value' => $element_params['multiline_add'])); ?>
input('chronofield[{n}][input_select_{n}_enable_dynamic_data]', array('type' => 'hidden', 'id' => 'input_select_{n}_enable_dynamic_data', 'value' => $element_params['enable_dynamic_data'])); ?>
input('chronofield[{n}][input_select_{n}_data_path]', array('type' => 'hidden', 'id' => 'input_select_{n}_data_path', 'value' => $element_params['data_path'])); ?>
input('chronofield[{n}][input_select_{n}_value_key]', array('type' => 'hidden', 'id' => 'input_select_{n}_value_key', 'value' => $element_params['value_key'])); ?>
input('chronofield[{n}][input_select_{n}_text_key]', array('type' => 'hidden', 'id' => 'input_select_{n}_text_key', 'value' => $element_params['text_key'])); ?>
Header(array('general' => 'General', 'other' => 'Other', 'validation' => 'Validation', 'dynamic_data' => 'Dynamic Data'), 'input_select_element_config_{n}'); ?>
tabStart('general'); ?>
input('input_select_{n}_label_text_config', array('type' => 'text', 'label' => 'Label Text', 'class' => 'small_input', 'value' => '')); ?>
input('input_select_{n}_input_name_config', array('type' => 'text', 'label' => 'Field Name', 'class' => 'small_input', 'value' => '', 'smalldesc' => 'No spaces or any special characters, but underscores _ and square brackets [] are allowed.')); ?>
input('input_select_{n}_input_title_config', array('type' => 'text', 'label' => 'Field title', 'class' => 'small_input', 'value' => '', 'smalldesc' => 'Change this to override the default JS validation error message.')); ?>
input('input_select_{n}_multiple_config', array('type' => 'checkbox', 'label' => 'Multiple', 'class' => 'small_input', 'value' => '1', 'rule' => "bool")); ?>
input('input_select_{n}_size_config', array('type' => 'text', 'label' => 'Size', 'class' => 'small_input', 'value' => '')); ?>
input('input_select_{n}_selected_config', array('type' => 'text', 'label' => 'Selected', 'class' => 'small_input', 'value' => '', 'smalldesc' => 'The selected value by default if any.')); ?>
input('input_select_{n}_showempty_config', array('type' => 'text', 'label' => 'Show Empty', 'class' => 'small_input', 'value' => '', 'smalldesc' => 'Write the text for the empty value (Please select) or leave empty for no empty value.')); ?>
input('input_select_{n}_options_config', array('type' => 'textarea', 'label' => 'Options', 'rows' => 5, 'cols' => 50, 'operation' => "multi_option", 'operation_fieldtype' => "select", 'smalldesc' => 'in value=text multi line format.')); ?>
input('input_select_{n}_input_id_config', array('type' => 'text', 'label' => 'Field ID', 'class' => 'small_input', 'value' => '')); ?>
input('input_select_{n}_input_class_config', array('type' => 'text', 'label' => 'Field Class', 'class' => 'small_input', 'value' => '')); ?>
tabEnd(); ?>
tabStart('other'); ?>
input('input_select_{n}_label_over_config', array('type' => 'checkbox', 'label' => 'Label Over', 'value' => '1', 'rule' => "bool")); ?>
input('input_select_{n}_hide_label_config', array('type' => 'checkbox', 'label' => 'Hide Label', 'value' => '1', 'rule' => "bool")); ?>
input('input_select_{n}_instructions_config', array('type' => 'textarea', 'label' => 'Instructions for users', 'rows' => 5, 'cols' => 50)); ?>
input('input_select_{n}_tooltip_config', array('type' => 'textarea', 'label' => 'Tooltip', 'rows' => 5, 'cols' => 50)); ?>
input('input_select_{n}_multiline_start_config', array('type' => 'checkbox', 'label' => 'Start a Multi field row', 'value' => '1', 'rule' => "bool")); ?>
input('input_select_{n}_multiline_add_config', array('type' => 'checkbox', 'label' => 'Add to a Multi field row', 'value' => '1', 'rule' => "bool")); ?>
tabEnd(); ?>
tabStart('validation'); ?>
input('input_select_{n}_validations_config', array('type' => 'checkbox', 'label' => 'Required', 'class' => 'small_input', 'value' => 'required', 'rule' => "split", 'splitter' => ",")); ?>
tabEnd(); ?>
tabStart('dynamic_data'); ?>
input('input_select_{n}_enable_dynamic_data_config', array('type' => 'select', 'label' => 'Enable', 'options' => array(0 => 'No', 1 => 'Yes'), 'default' => '1', 'smalldesc' => 'Enable Dynamic options loading, the options should exist in the $form->data array.')); ?>
input('input_select_{n}_data_path_config', array('type' => 'text', 'label' => 'Data Path', 'value' => '', 'smalldesc' => 'The data path in the $form->data array, can be a MODEL ID, or a path using dots: MODEL1.MODEL2')); ?>
input('input_select_{n}_value_key_config', array('type' => 'text', 'label' => 'Value Key', 'smalldesc' => 'The key name under which each option value will be found, so for example, if you have a multi list of users data loaded, then you may enter here "id"')); ?>
input('input_select_{n}_text_key_config', array('type' => 'text', 'label' => 'Text Key', 'smalldesc' => 'The key name under which each option text will be found, so for example, if you have a multi list of users data loaded, then you may enter here "username"')); ?>
tabEnd(); ?>