0

I've got two fields in my form which are called geographicarea and specialty.

I'd like to use these values in an SQL query when the form is submitted.

How can I do it?

2

If I understand you correctly, you'd like to get a hold of the data before it gets inserted in the database so you can do something else with it?

If this is the case, hook_webform_submission_presave is your friend. The $submission object will hold the submission data. This lets you change it before it's inserted in the database or, as in your case, just do something else with it.

Here's a list of all the webform hooks for D7 (with a link to D6 hooks as well if that's what you're using).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.