comment_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state)
Implements hook_form_FORM_ID_alter() for 'field_storage_config_edit_form'.
File
- core/modules/comment/comment.module, line 328
- Enables users to comment on published content.
Code
function comment_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state) { if ($form_state->getFormObject()->getEntity()->getType() == 'comment') { // 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; } }
Please login to continue.