By abuzakaria on
Hi, How can I alter a node form differently based on its ADD and EDIT state? For example: I want to show a textfield that shows up in ADD form but doesn't show up in EDIT form of the same node.
If I used hook_form_FORM_ID_alter() with the targeted form id, the change happens on both ADD and EDIT form because the form id is the same for both states.
Please help me find a way to do this. Thanks!
Comments
I would use the Fiield
I would use the Fiield Permissions module. You can configure any CCK field to use permissions and then only enable the add permission for the field.
But the textfield I am adding
But the textfield I am adding is not a cck field of the same node. I am using form_alter to change the form by adding a text box which will enter information to another table when the form is submitted. But when editing the node, I don't want to show that text box anymore. Thanks for the suggestion though!
anybody? I am stuck at this
anybody? I am stuck at this :(