test default value
This commit is contained in:
@@ -5,17 +5,15 @@
|
||||
*/
|
||||
|
||||
|
||||
function booking_import_data_admin()
|
||||
function booking_import_data_admin($form, &$form_state)
|
||||
{
|
||||
global $event;
|
||||
$form = array();
|
||||
|
||||
$prefix = t("<p>Upload csv file containing data to import. Minimum fields present should be <strong>nid</strong>, " .
|
||||
" along with user-specified fields of <strong>!config</strong>. CSV Column names should match exactly (case sensitive).</p>",
|
||||
array('!config' => variable_get('booking_import_include_fields', '')));
|
||||
" along with fields specified below. CSV Column names should match exactly (case sensitive).</p>");
|
||||
$prefix .= "<p>Note that only registration specific data like phone numbers, barcodes, etc can be updated, as well as study group membership and roles. Other data like room allocations cannot be uploaded at this time.</p>";
|
||||
|
||||
$form = array();
|
||||
|
||||
$form['file'] = array(
|
||||
'#type' => 'file',
|
||||
'#title' => t('CSV data'),
|
||||
@@ -30,13 +28,14 @@ function booking_import_data_admin()
|
||||
'#type' => 'select',
|
||||
'#multiple' => TRUE,
|
||||
'#title' => t('Select database fields for this import'),
|
||||
'#description' => t('Select database fields to import from an uploaded CSV file. Ensure you hold down control/command when selecting multiple options.'),
|
||||
'#description' => t('Select database fields to import from an uploaded CSV file. Ensure you hold down control/command when selecting multiple options. ' .
|
||||
'Fields are sorted alphabetically.'),
|
||||
'#options' => $booking_view_fields,
|
||||
'#size' => 10,
|
||||
'#default_value' => isset($form_state['input']['booking_import_data_fields']) ? $form_state['input']['booking_import_data_fields'] : array('nid'),
|
||||
//'#default_value' => variable_get('booking_import_include_fields_dynamic', ''),
|
||||
);
|
||||
|
||||
|
||||
$form['submit'] = array (
|
||||
'#type' => 'submit',
|
||||
'#value' => t('Submit'),
|
||||
|
Reference in New Issue
Block a user