AAAAwww/administrator/components/com_chronoforms/form_actions/db_record_loader/db_record_loader.ctp000060400000017757151466111300032322 0ustar00home/academiac
DB Record Loader
Header(array('basic' => 'Basic', 'advanced' => 'Advanced', 'help' => 'Help'), 'db_record_loader_config_{n}'); ?> tabStart('basic'); ?> input('action_db_record_loader_{n}_dbfield_config', array('type' => 'text', 'label' => "DB Field", 'class' => 'medium_input', 'value' => '', 'smalldesc' => "The field name which will be used to query the table record.")); ?> getTableList(); $options = array(); foreach($tables as $table){ $options[$table] = $table; } ?> input('action_db_record_loader_{n}_table_name_config', array('type' => 'select', 'label' => 'Table', 'options' => $options, 'empty' => " - ", 'class' => 'medium_input', 'smalldesc' => "The table name to load the data from.")); ?> input('action_db_record_loader_{n}_request_param_config', array('type' => 'text', 'label' => "Request Param", 'class' => 'medium_input', 'value' => '', 'smalldesc' => "The param name which will exist in the request url to the form, its value will be used to load the target db record, if the value of this parameter is an array then the array values will be used inside 'IN' statement.")); ?> input('action_db_record_loader_{n}_load_fields_config', array('type' => 'select', 'label' => 'Load Fields', 'options' => array(0 => 'No', 1 => 'Yes'), 'class' => 'medium_input', 'smalldesc' => "Should any form fields be loaded with data ? your field name should match the table's column name.")); ?> input('action_db_record_loader_{n}_curly_replacer_config', array('type' => 'select', 'label' => 'Curly Replacer', 'options' => array(0 => 'No', 1 => 'Yes'), 'class' => 'medium_input', 'smalldesc' => "Should curly brackets fields names be replaced with data from the form data array ?")); ?> input('action_db_record_loader_{n}_model_id_config', array('type' => 'text', 'label' => "Model ID", 'class' => 'medium_input', 'value' => '', 'smalldesc' => "The key under which the loaded record data will be stored in the form->data array.")); ?> input('action_db_record_loader_{n}_load_under_modelid_config', array('type' => 'select', 'label' => 'Load Under Model ID', 'options' => array(0 => 'No', 1 => 'Yes'), 'class' => 'medium_input', 'smalldesc' => "Should the data get loaded under the model id inside the data array ? this will affect your form fields names, if this is set to yes then your fields names should be in this format : name='MODEL_ID[field_name]'
and your curly brackets strings: {MODEL_ID.field_name}")); ?> tabEnd(); ?> tabStart('advanced'); ?> input('action_db_record_loader_{n}_content1_config', array('type' => 'textarea', 'label' => 'WHERE statement', 'rows' => 10, 'cols' => 50, 'smalldesc' => "The code used for the WHERE statement, some notes:
1 - leave empty to use the default request param with column name formula OR use it to load whatever record you need.
2 - don't use the WHERE word.
3 - You can use PHP code with tags. ")); ?> input('action_db_record_loader_{n}_array_fields_sets_config', array('type' => 'text', 'label' => "Array Fields Sets", 'class' => 'medium_input', 'value' => '', 'smalldesc' => "list of fields of types array stored in the table, fields values will be extracted, you can use single or multiple sets, e.g:
field1,field2 OR field1,field2-field3,field4.")); ?> input('action_db_record_loader_{n}_array_separators_config', array('type' => 'text', 'label' => "Array Separators", 'class' => 'medium_input', 'value' => '', 'smalldesc' => "The separators used to explode the array fields values, multiple sets supported, should match the number of sets for the array fields.")); ?> input('action_db_record_loader_{n}_params_fields_config', array('type' => 'text', 'label' => "Parameters fields", 'class' => 'medium_input', 'value' => '', 'smalldesc' => "Comma separated list of fields which will be in Joomla params fields format, values will be extracted to an array.")); ?> tabEnd(); ?> tabStart('help'); ?>

tabEnd(); ?>