What I'm trying to do is hide a cck checkbox field if the node is in create mode (node/add), but show it in edit mode. I couldn't figure out how to use rules to test which state the node was in, so I tried to check for the title field being empty--since it can only be empty during create mode. Nothing I've tried has worked.
My latest effort is adding an "Execute custom PHP code" condition with:
<?php return empty($form['title']['#value']) ?>
but this returns false in either state. BTW, I'm completely new to PHP.
I'd really love some help with this. Been struggling with it for a number of days. Thanks!
Comments
Comment #1
jvogt commentedComment #2
ayesh commentedPerhaps Conditional CCK Fields module is the ideal solution.
Anyway, add condition as compare strings and add [node:title] to one box and keep other box empty.
Comment #3
jvogt commentedYeah, I tried that, but in all of those compare situations, it won't let you leave the second box empty. That's why I'm trying to do it with php.
Guess I'll have to try that other module. Thanks for the advice!
Comment #4
tr commented