I need to perform some operations by ajax before a node is submitted. So, how can I capture the node content and title which has been filled in by the user and pass it onto my ajax callback ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ok so here is the code-
So for this you need to specify “hello” as your callback function for the element for which the ajax attribute is being set.
For example if you want to call this by a button press-
then your callback function should be-
}
$content variable now holds the node title as well as node content, which you can use for further manipulations. cheers !! 🙂