function opigno_simple_ui_question_typesform_alter in Opigno 7
Implements hook_form_form_alter() for all question types.
1 call to opigno_simple_ui_question_typesform_alter()
- opigno_simple_ui_form_node_form_alter in modules/
simple_ui/ opigno_simple_ui.module - Implements hook_form_BASE_FORM_ID_alter() for node_form.
File
- modules/
simple_ui/ includes/ opigno_simple_ui.quiz.inc, line 38 - Quiz specific enhancements.
Code
function opigno_simple_ui_question_typesform_alter(&$form, $form_state) {
// Remove the "Add to Quiz" options. This is for very advanced users, and rarely
// used.
unset($form['add_directly']['#group']);
$form['add_directly']['#access'] = FALSE;
$form['add_directly']['#attributes']['style'][] = 'display:none;';
// Change the order of the fields. Put the title on top, always.
$form['title']['#weight'] = -30;
}