I need a text field populated automatically with a random number that can not be modified by the user. It is created after the form was submitted the first time. I can use the computed field for nodes or profiles but not in the web form. I have used a custom webform module to populate select lists but not text fields. How can I achieve this?
Comments
Comment #1
luthien commentedHow to set up the value for a non-editable Text field, using a custom module, but do it only after the form was submitted the first time? Using form_alter only works for setting up the value before the user submits the form.
mymodule.info
mymodule.module
Using hook_webform_submission_presave() was the solution.
mymodule.module
Comment #2
luthien commented