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

seancr’s picture

You 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' ][ ??? ]
}
}

Scott M. Sanders’s picture

I want this too. I have another keywords field with a requested higher char limit so want to hide this one (easily).

DamienMcKenna’s picture

DamienMcKenna’s picture

Title: Allow to disable keywords metatag » Document how to disable/modify meta tags
Version: 7.x-1.0-alpha4 » 7.x-1.x-dev
Component: Code » Documentation
DamienMcKenna’s picture

Status: Active » Closed (duplicate)
remkovdz’s picture

Status: Closed (duplicate) » Active

Is is already possible in some way to make the description and/or keyword fields required?

DamienMcKenna’s picture

Status: Active » Closed (duplicate)

This issue was closed in favor of #1466292: Document all Metatag's hooks, lets keep the discussion there.