I would like to be able to remove the option to show the "Edit Summary" option. All I need is that users fill up the field and save. I believe this is called "Teaser" but I might be wrong.
4 Answers
You can actually disable user's ability to provide summary. I found this while pursuing the first solution:
Administration » Structure » Content types » Basic page
you should see "Manage Fields" tab. Click on it, and you should see a table. The row for Body should show Widget Type as "Text area with a summary" which is a link that allows you to edit it.
Rather than changing the Widget Type which is not possible if you already have one or more entries, go to the "Edit" tab.
About half-way down the tab is a checkbox: "Summary input" ("This allows authors to input an explicit summary..."). Uncheck it, and save. Your content edit page for Basic Page should be free of "Edit summary" options.
As an alternative solution, you can use a hook to hide the field:
/**
* Implements hook_form_alter().
*
* @param $form
* @param $form_state
* @param $form_id
*/
function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'YOUR_NODETYPE_node_form') {
$form['body'][LANGUAGE_NONE][0]['summary']['#access'] = FALSE;
}
}
Go to the content type, then to manage fields then edit for the body field.
There is a check box to enable or disable the summary field display
-
This solution is by far the most easy option and solves the problem perfectly. Thanks– JarcoAug 5, 2014 at 15:48
Just go to the Manage Fields page for your entity (content type, user, taxonomy term, etc) and change the body field widget from Text Area with Summary to Text Area.
I'm assuming you're talking about the standard body field, but this should apply to any long text field.
EDIT
Actually, this won't work as the field TYPE is probably already set to Long Text with Summary - so you'll have to change your actual field type I'm afraid.
-
I knew this was the solution but the issue is that I am not given another option when editing that field since there is also information stored in the database. I elected to hide that using CSS. I think the real solution is to create another field but that will set me back as there are several content types on this website. May 4, 2013 at 18:02
-
Changing the field type is only possible if there is no content using the field, i.e. no data in the field. Drupal will disable changing of the type once data is present and inform you. The solution would then be to re-enter the data in the new text field before deleting the old. Not great if manually done, so use node export module to CSV, adjust the field heading to the new field, and import using CSV functionality of Feeds module. Jul 26, 2013 at 13:30
-
@OtterCreativeStudio solution is another option. Because at the moment there isn't an out-of-the-box way (i.e. as in a module to provide this) to insert extra CSS classes into form fields you would need to experiment with the Form API and hooks to do this. Once you achieve that, you can specifically hide fields on a specific form without impacting others. Jul 26, 2013 at 13:32