Forums

Add input text fields after checkbox selection

pixelhexe 21 Feb, 2020
I am trying to offer a selection of 15 products (from multiselect field or checkboxes) from whom the user can select one or several items with a simple "add product" button.

For each product there shall be added 8 fields in which the user can give additional information (i.e. description).

I wrote some javascript to add each product with its 8 input fields (placeholder.innerHTML=...) but this is to exhausting for each field. So I am looking for a better solution with Chronoforms tools. I have the feeling that the "repeater area" could be made for this but ended in a chaos.
I will need a sort of loop with each product that the user selects to write the 8 fields.

Any suggestions how to solve this or is maybe not possible without custom script?
Thanks!
healyhatman 21 Feb, 2020
Pretty sure there's a "dynamic fields" or "field events" demo form you can look at.
pixelhexe 26 Feb, 2020
Answer
Thank you for your suggestion - although "dynamic fields" or "field events" was not exactly what I am looking for, I completely forgot the demo forms. And indeed I found the "Repeater area demo" with which I could realize nearly all the requirements.

The repeater area is offering a button with which you can add "repeater areas". My only compromise was the selection field which is now repeated in every area. It does not add directly another product area - this is the job of the add button - but it is sufficient for my needs.

Thank you for bringing me on the right track!🙂
This topic is locked and no more replies can be posted.