Dynamic form input fields based on user selection from select list

Bernard Rouzeau shared this question 2 years ago
Answered

Is it possible to create a dynamic form that loads different input field types (i.e. text, phone number, date range...) based on a selection from a select list component. For example, I have a form that says "Filter offers by:" and next to that title is a select list and an input field next to it; I would like that input data type to change based on what is selected from the select list next to it.

Comments (3)

photo
2

Hi Bernard,


Yes that's possible, and there are several ways you could achieve this.


1) First create an event that sets the value to a variable that detects which data has been selected. Then on the next page, create different dynamic panels with all possible options - e.g. one panel with one option, one panel with two options etc. Then create 'On Page Load' events that sets an active panel. To detect which panel, create conditions for each that detects the value of the variable. Only one will be set as active.


2) Also create an event that sets value to a variable that detects which data has been selected. On the next page, have all possible fields visible. On that page, create an On Page Load event that hides certain input fields depending on what data hasn't been selected.


Best,


Danielle

photo
1

Hi, how to set value to a variable that detects which data has been selected.


and "on next page " what does it mean.

if you could explain it step by step , that would be great.

photo
1

Yes, i also dont know "how to add selected data in veriable"