Closed (won't fix)
Project:
Webform PHP
Version:
6.x-3.x-dev
Component:
Webform PHP
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2010 at 07:27 UTC
Updated:
28 Jan 2011 at 04:08 UTC
I allow users to save a draft of the webform in order to complete it later.
However I have in additional processing a function which adds a role to their account which keeps them from accessing this questionnaire.
Every time an user saves the questionnaire as a draft this role is added which is really annoying!
Comments
Comment #1
quicksketchI don't help with custom coding.
Comment #2
filpet commentedthis isn't about custom coding, it's about that it below the additional processing field it clearly says:
Additional processing code can be used to save data to external sources or modify the data before it is saved. This code is only executed after all validation has passed and the entire form has been completed. For examples of processing code, see the Webform handbook on submission code
"the entire form has been completed" <<- that's exactly what this is not doing, it is executed before the form is completed!
Comment #3
quicksketchAh, well saving a draft "saves" the submission to the database just like a normal complete submission, it's just flagged as a draft. I suggest checking $form_state['values']['op'] or $form_state['clicked_button']['#value'] to prevent saving on draft button clicks.
Perhaps the help text should be "Completed or a draft is saved", since that's actually the case and more helpful than not having a way to execute code on saving a draft.
Comment #4
quicksketch#1043088: This project is abandoned, please stop using it