You are here

function formdefaults_export in Form Defaults 6.2

Same name and namespace in other branches
  1. 5.3 formdefaults.admin.inc \formdefaults_export()
  2. 7 formdefaults.admin.inc \formdefaults_export()
1 string reference to 'formdefaults_export'
formdefaults_menu in ./formdefaults.module
Implements hook_menu.

File

./formdefaults.admin.inc, line 95

Code

function formdefaults_export() {
  $search_str = $_SESSION['formdefaults_search'];
  $form['search_str'] = array(
    '#type' => 'textfield',
    '#default_value' => $search_str,
  );
  $form['search'] = array(
    '#type' => 'submit',
    '#value' => 'Search',
    '#size' => 10,
  );
  $form_list = _formdefaults_search($search_str);
  $form['count'] = array(
    '#type' => item,
    '#title' => t('Forms Exported'),
    '#value' => count((array) $form_list),
  );
  $form_data = base64_encode(serialize($form_list));
  $form['data'] = array(
    '#type' => 'textarea',
    '#title' => 'Data',
    '#default_value' => $form_data,
    '#rows' => 20,
    '#cols' => 80,
  );
  return $form;
}