0
I have a dynamic form. With a field radiobutton
and a select
. According to the value I select in the option I populate the list field with selected values.
Example.
Option 1 Option 2
When selecting option 1, the select field is populated with Item A Item B Item C
When selecting option 2, the select field is populated with Item X Item W
Biggest problem is how to insert options
within the select
javascript.
Welcome to Stackoverflow Samuel. Please post an excerpt of the code you already have to get a better idea of the problem, I suggest you read this help article from the site: How to create a Minimum, Complete and Verifiable example.
– Pedro Gaspar
you can use jQuery in your project? or it must be in native Javascript without libraries.
– Paulo Roberto Rosa
Hi Paulo. I can’t use Jquery. It’s a dynamic form, and you’ve created scripts with the elements I created on the screen. John resolved in the answer below. It’s basically that way, just find out so he doesn’t keep adding up while I switch between options.
– samuel tomkelski