function demo_dump_form in Demonstration site (Sandbox / Snapshot) 6
Same name and namespace in other branches
- 7 demo.admin.inc \demo_dump_form()
Form builder to create a new snapshot.
1 string reference to 'demo_dump_form'
- demo_menu in ./
demo.module - Implements hook_menu().
File
- ./
demo.admin.inc, line 116 - Demonstration Site administrative pages
Code
function demo_dump_form() {
$form['dump']['filename'] = array(
'#title' => t('File name'),
'#type' => 'textfield',
'#autocomplete_path' => 'demo/autocomplete',
'#required' => TRUE,
'#maxlength' => 128,
'#description' => t('Enter the snapshot file name without file extension. Allowed characters are a-z, 0-9, dashes ("-"), underscores ("_") and dots.'),
);
$form['dump']['description'] = array(
'#title' => t('Description'),
'#type' => 'textarea',
'#rows' => 2,
'#description' => t('Optionally enter a description for this snapshot here. If no description is given and a snapshot with the same filename already exists, the previous description is used.'),
);
$form['dump']['tables'] = array(
'#type' => 'value',
'#value' => demo_enum_tables(),
);
return confirm_form($form, t('Are you sure you want to create a new snapshot?'), 'admin/build/demo', t('If the above filename already exists, creating a new snapshot will overwrite the existing snapshot. This action cannot be undone.'), t('Create'), t('Cancel'));
}