You are here

function cer_form in Corresponding Entity References 7.3

Form builder to create or edit presets.

File

./cer.admin.inc, line 6

Code

function cer_form(array $form, array &$form_state, CerPreset $preset, $do = 'edit', $entity_type = NULL) {
  field_attach_form('cer', $preset, $form, $form_state);
  $form['cer_right']['#id'] = 'edit-cer-right';
  $form['cer_left'][LANGUAGE_NONE]['#ajax'] = array(
    'callback' => 'cer_update_right',
    'wrapper' => $form['cer_right']['#id'],
  );
  $form['actions'] = array(
    'submit' => array(
      '#type' => 'submit',
      '#value' => t('Save'),
    ),
    '#weight' => 10,
  );
  return $form;
}