Add input text fields after checkbox selection

Add dynamic input fields after selecting products in a form.

Overview

The issue was needing to create multiple input fields for each selected product without writing extensive custom JavaScript.
Use the ChronoForms Repeater Area feature to dynamically add sets of fields. Configure the repeater to include the necessary input fields, allowing users to add new sections as needed for each product.

Answered
ChronoForms v6
pi 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!
he healyhatman 21 Feb, 2020
Pretty sure there's a "dynamic fields" or "field events" demo form you can look at.
pi 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.