How do i get the values of specific input elements inside the gform_after_submission hook in Gravity Forms?
I can get the labels with
foreach($form['fields'] as $k=>$v)
{
$label=$form['fields'][$k]['label'];
}
but how do I get the values?
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.
Following the Gravity guidelines you set up the hook to call your own function – in the case below the function is after_submission().
You can access the input values of individual form elements using their IDs like so;
The IDs are all there in the form fields title in the backend, just hover over each one and it’ll give you the type and ID (ie ‘Single Line Text: Field ID 2).
http://www.gravityhelp.com/documentation/page/Gform_after_submission