Submitted by paul on Fri, 08/26/2011 - 11:20am

I'm trying to hide a field in the comments form depending on a value in the node but can't get it to work.

This is what I have:

if ($node['field_yesno'][0]['value'] = 'no') {
$form['field_partner']['#access'] = FALSE;

But it doesn't work,

Any help appreciated!

Thanks.

The content of this field is kept private and will not be shown publicly.

Plain text

  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.