i want to process my form to get zodiac symbol by the date so i need to use my function and save the symbol in the profile's table so, wich tools can you give me to process this form?
thanks
i want to process my form to get zodiac symbol by the date so i need to use my function and save the symbol in the profile's table so, wich tools can you give me to process this form?
thanks
Comments
Comment #1
quicksketchCurrently the only options for hooking into the Webform processing are:
- hook_form_alter() to add a #submit or #validate handler that can use form_set_value() to set a value to be saved
- The additional processing and validation fields located under "Webform advanced settings" when editing the Webform. You can set the values of the form into the $form_values['submitted'] array and they will be saved into the database.
Comment #2
jruberto commentedQuicksketch, I'm (using 5.x-2.1.2) trying to do exactly what you recommend in your second bullet point and get errors:
code sample from "Additional Processing":
results in:
user warning: Duplicate entry '6-0-0' for key 1 query: INSERT INTO webform_submitted_data (nid, sid, cid, no, data) VALUES (2, 6, 0, 0, '6') in /srv/www/drupal-5.1/includes/database.mysql.inc on line 172.The the nid and the sid are correct, but the cid is always zero, and I don't know what no is. Each time the form is submitted, one entry does wind up inserted into webform_submitted_data with a cid of zero. Of course that works once, then results in a duplicate key error for subsequent attempts.
The field I am referencing has been defined as a hidden field (tho I did get the same result trying it with a textfield). This is a multi-page form, and all the hidden fields are on the last page. I have tried setting default values in the field definition and that makes no difference. Run out of things to try. Any thoughts? Thanks so much.
Comment #3
jruberto commentedand of course the $form_values['submitted'] array is indexed by cid, not by field name, hence the missing cid. sometimes all it takes is posting it to make the answer totally clear. :)
works like a charm.
Comment #4
quicksketchFantastic juberto :)
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.