function node_export_form in Node export 6.3
Same name and namespace in other branches
- 6.2 node_export.module \node_export_form()
- 7.3 node_export.pages.inc \node_export_form()
Export form.
Parameters
$form_state: The form state. @param $nids An array of node ids that are being exported. @param $code_string The Node export code. @param $format The Node export format.
2 string references to 'node_export_form'
- node_export_file_form_alter in modules/
node_export_file/ node_export_file.module - Implementation of hook_form_alter().
- node_export_gui in ./
node_export.pages.inc - Export GUI function.
File
- ./
node_export.pages.inc, line 305 - The Node export pages file.
Code
function node_export_form($form_state, $nids, $code_string, $format) {
$form = array();
if (empty($nids)) {
drupal_set_message(t('No content selected.'), 'warning');
$nids = array();
}
if (variable_get('node_export_code', 'all') == 'all') {
$form['nids'] = array(
'#type' => 'hidden',
'#value' => implode(', ', $nids),
);
$form['format'] = array(
'#type' => 'hidden',
'#value' => $format,
);
$form['download_file'] = array(
'#type' => 'submit',
'#value' => t('Download file'),
);
}
$form['export'] = array(
'#type' => 'textarea',
'#title' => t('Node export code'),
'#default_value' => $code_string,
'#rows' => 30,
'#description' => t('Copy this code and then on the site you want to import to, go to the <em>Node export: import</em> link under <em>Create content</em>, and paste it in there.'),
'#attributes' => array(
'wrap' => 'off',
),
'#wysiwyg' => FALSE,
);
return $form;
}