1

I'm trying to add a "add more" button on my webform. I tried "Webform Add More" module, but I need to add fields as user request instead of show and hide fields as user request another one. Is there any way to programmatically add fields to webform in a custom module?

I can't make a webform with the same field repeated 30 times if a user want to submit 30 different items.

I'm currently using Webform 3.18 and Drupal 7.38

Thanks for the help.

5
  • How about making one field with input separated by something? Nov 4, 2015 at 16:28
  • So, show the same item repeatedly with jQuery, and add the values consecutive as a text separated by a pipe for example ?
    – Alex js
    Nov 4, 2015 at 16:32
  • In matter of fact, I wasn't thinking that far (jQuery), but sounds good. If you want to manipulate the data after submission. there is a hook_webform_submission_insert Nov 4, 2015 at 16:35
  • It seems to be a good solution, but If I want to display different values associated to that "item" field or make submission mail and submission results table understandable, I have to manipulate 3 different templates. So if I could add fields to the webform itself, it would be easy to understand as for the customers and for the store admin, the submission results table and submission email.
    – Alex js
    Nov 4, 2015 at 16:50
  • The only problem is, all changes in form structure will be global for all users Nov 4, 2015 at 17:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.