You are here

function certificate_field_grouping_add_form in Certificate 7.2

Same name and namespace in other branches
  1. 8.3 certificate.admin.inc \certificate_field_grouping_add_form()
  2. 6.2 certificate.admin.inc \certificate_field_grouping_add_form()
  3. 6 certificate.admin.inc \certificate_field_grouping_add_form()
  4. 7.3 certificate.admin.inc \certificate_field_grouping_add_form()
  5. 3.x certificate.admin.inc \certificate_field_grouping_add_form()

Form to add a field grouping.

1 string reference to 'certificate_field_grouping_add_form'
certificate_menu in ./certificate.module
Implements hook_menu().

File

./certificate.admin.inc, line 288
Administrative pages for Certificate module.

Code

function certificate_field_grouping_add_form($form, &$form_state) {
  $form = array();
  $form['fieldgroup_title'] = array(
    '#title' => 'Title of field group',
    '#type' => 'textfield',
    '#required' => TRUE,
  );
  $form['fieldgroup_name'] = array(
    '#type' => 'machine_name',
    '#title' => 'Machine name of field group',
    '#required' => TRUE,
    '#machine_name' => array(
      'source' => array(
        'fieldgroup_title',
      ),
      'label' => 'Machine name',
      'exists' => 'certificate_field_grouping_machine_name_exists',
    ),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Create',
  );
  return $form;
}