Detect in form_alter if the node submitted is added or edited
2009
15
Dec
When you want to alter a form on Drupal, it is useful to detect if the form being submitted is to add a new node or edit an existing node. To detect if a form is being added or submitted, check the
$form[<content-type>]['nid']['#value'].
Example :
$form['book']['nid']['#value'].
If the value is new, the node is being added.
If the value is numeric, the node with nid as the number is being edited.
Anyone got better ideas ?
Similar Posts
Related Searches
- Perl Hash Remove Node
- Enable Right Click Paste In Linux
- Camera Driver For Sony Vpccw26fg Windows7
- Dell Studio 14z Vs Sony Vaio Cw
- Sony Vaio Cw Linux Compatible
- Canon Sx120is Ubuntu Camera
- Reviews About Sony Vaio Vpccw26fg
- Windows 32 Bit Or 64 Bit
- Usable Ram 1500 Speed
- Gddr3 Graphics Ram On Sony Vaio Vpccw26fg
- Pyramid Division Multiplication Addition Subtraction Puzzle
- Dell Inspiron 15 Review Linux Compatible
- Error Getting Mechanize
- Accessible Of Drupal

Comments
Post new comment