By stclaird on
Hello Forum,
When I need to capture the title of the node i am working on i can do this:
$title = ($node->title);
but in in form_alter that doesn't work. So how do i capture the title (or any node object) of the noide i am submitting?
I have searched but am not looking in the right places obviously!
Thank you in advance
Comments
form_alter takes $form_id
form_alter takes $form_id and $form as arguments, so try $form['title']?
I think i sorted it another way but thank you
$node = $form['#node'];
$title= $node->title;
I knew it was in there somewhere after getting the 'Form Inspect Module'!
Thank you
how to do this in drupal 6
Hello,
I am using drupal 6 and i have same question. i am also trying to print title using form_alter() method but its not helping me out. here is code
can you let me know what is wrong here ? i am trying to search on document but not getting solution.
'signup_form' isn't a node
'signup_form' isn't a node type, so the node object won't exist.
Contact me to contract me for D7 -> D10/11 migrations.