You are here

function properties_generate_form in Dynamic properties 7

Form builder function, display form to generate properties.

1 string reference to 'properties_generate_form'
properties_generate_menu in properties_generate/properties_generate.module
Implements hook_menu().

File

properties_generate/properties_generate.module, line 21

Code

function properties_generate_form() {
  $form['num_categories'] = array(
    '#type' => 'textfield',
    '#title' => t('How many categories would you like to generate?'),
    '#default_value' => 20,
    '#size' => 10,
  );
  $form['num_attributes'] = array(
    '#type' => 'textfield',
    '#title' => t('How many attributes per category would you like to generate?'),
    '#default_value' => 10,
    '#size' => 10,
  );
  $form['kill'] = array(
    '#type' => 'checkbox',
    '#title' => t('Delete all existing properties before creating new ones.'),
    '#default_value' => FALSE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Generate'),
  );
  return $form;
}