I have a content type and I am interested in make required the field keyword and field description of the nodewords module? anyone knows how can I do it?

I was trying this code:

$form['nodewords']['description']['value']['#required'] = TRUE;
$form['nodewords']['keywords']['value']['#required'] = TRUE;

in form_alter ,but its not working... :(

Can anybody please reply

Thanks in advance for your help.

Anu Mathew

Comments

DamienMcKenna’s picture

Version: 6.x-1.13 » 6.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)
Issue tags: -nodewords keywords, -description metatag

That should work, are you sure your hook_form_alter was passing the $form value by reference, i.e. hook_form_alter(&$form, &$form_state, $form_id)?