You are here

function node_export_form in Node export 7.3

Same name and namespace in other branches
  1. 6.3 node_export.pages.inc \node_export_form()
  2. 6.2 node_export.module \node_export_form()

Export form.

Parameters

$form: The form array.

$form_state: The form state.

$nids: An array of node ids that are being exported.

$code_string: The Node export code.

$format: The Node export format.

Return value

The built form array.

1 string reference to 'node_export_form'
node_export_gui in ./node_export.pages.inc
Export GUI function.

File

./node_export.pages.inc, line 379
The Node export pages file.

Code

function node_export_form($form, &$form_state, $nids, $code_string, $format) {
  $form = array();
  if (variable_get('node_export_code', 'all') == 'all') {
    $form['nids'] = array(
      '#type' => 'hidden',
      '#value' => $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>Add content</em>, and paste it in there.'),
    '#attributes' => array(
      'wrap' => 'off',
    ),
    '#wysiwyg' => FALSE,
  );
  return $form;
}