function votingapi_widgets_form_field_storage_config_edit_form_alter in Votingapi Widgets 8
Implements hook_form_FORM_ID_alter().
File
- ./
votingapi_widgets.module, line 55 - Contains votingapi_widgets.module..
Code
function votingapi_widgets_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state) {
if ($form_state
->getFormObject()
->getEntity()
->bundle() == 'voting_api_field') {
// We only support posting one comment at the time so it doesn't make sense
// to let the site builder choose anything else.
$form['cardinality_container']['cardinality']['#default_value'] = 1;
$form['cardinality_container']['#access'] = FALSE;
}
}