function formassembly_form_submit in FormAssembly 7
Submit handler for the fa_form entity form.
_state
Parameters
$form:
File
- ./
formassembly.module, line 484 - Contains hooks implementations and callbacks to non-admin pages.
Code
function formassembly_form_submit($form, &$form_state) {
// Turn user entered key|value pairs into serialized array.
$value =& $form_state['values']['fa_query_params']['und'][0]['value'];
$value = serialize(list_extract_allowed_values($value, 'list_text', FALSE));
$entity = $form_state['values']['fa_form'];
field_attach_submit('fa_form', $entity, $form, $form_state);
entity_get_controller('fa_form')
->save($entity);
drupal_set_message(t('Form <em>@name</em> has been saved.', array(
'@name' => $entity->name,
)));
$form_state['redirect'] = 'formassembly/' . $entity->eid;
}