Using webform 3 module, is there a way to dynamically add more fields or do these fields have to be created in the database first? Currently that's what I am doing and with javascript toggling the css display attribute to show or hide fields.
2 Answers
See this question and the accepted answer over at Stack Overflow: https://stackoverflow.com/questions/13592932/drupal-6-x-add-more-module-no-end-to-adding-more
Basically, the answer is no. This issue (354381) addresses the problem. From the module's author:
[...] there is no progress on this subject. The ability to support multiple values requires a tremendous amount of re-architecting, including changes to the way CSVs are generated, analysis, the database structure, and the UI (both for administrators and users). I wouldn't expect this feature to be added any time soon.
A possible workaround is provided at the StackOverflow question linked above. In summary, you could create a content type (or, for Drupal 7, a block type using BEAN might be slightly more appropriate). And then give anon users permission to create that entity - simulating a webform.
You can use Webform Add More module to dynamically add more fields in webform. The project page says:
Webform Add More enables selected fieldsets to be initially hidden and progressively shown with an Add more button, mimicking CCK multiple fields. This module adds a checkbox setting to webform fieldset components to select which should have Add more functionality, as well as an advanced setting to override the button label per Webform
-
4The Add more module is very poor. It doesn't dynamically add fields in the database but shows/hides instead. Also it fails to load when I style my form or use Arrange fields.– UraCommented Apr 29, 2014 at 18:38