Closed (duplicate)
Project:
Metatag
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2012 at 20:40 UTC
Updated:
12 Apr 2013 at 13:02 UTC
Considering the fact that search engines do not index the keywords metatag, I would like to be able to disabe/hide the keywords entry field on edit forms. This would prevent confusion for the editors. Is there currently a way to do so? If not, could it be added as a configuration option (what metatags to allow to be filled in)?
Comments
Comment #1
seancr commentedYou can control which fields are available to "editors" by using hook_form_alter.
If you have a module you could do something like
function mymodule_form_alter( &$form, &$form_state, $form_id )
{
if( $form_id == 'page_node_form' )
{
//If you have theme developer module - you can see all the stuff you modify here
//dpm( $form );
//You'll probably want to edit the metatags key
//$form[ 'metatags' ][ ??? ]
}
}
Comment #2
scott m. sanders commentedI want this too. I have another keywords field with a requested higher char limit so want to hide this one (easily).
Comment #3
damienmckennaI marked both of these as duplicates: #1606310: Make Keywords and Description Required, #1782830: How can I do the field Keywords and the field Description mandatory in a specific content type?
Comment #4
damienmckennaI marked #1611584: Document how to change meta tag length as a duplicate.
Comment #5
damienmckennaDuplicate of #1466292: Document all Metatag's hooks.
Comment #6
remkovdz commentedIs is already possible in some way to make the description and/or keyword fields required?
Comment #7
damienmckennaThis issue was closed in favor of #1466292: Document all Metatag's hooks, lets keep the discussion there.