dmalovich
asked on
I want to move html form fields around after making a selection in a drop down box
I've included the html form, css, and javascript. When you select 'Alcohol Type', depending on your selection, the form changes. For example, if you select 'Spirits', then it will also show 'Spirits Type' and 'Made Outside N.A., Mexico?'. If you select 'Beer', 'Sprirt Cooelrs' or 'Wine Coolers' then those 2 fields disappear. If you select 'Wine', 'Cider', or 'Sparkling Wine' then another form field 'bottled in?' appears. These are the 3 situations.
Now what I'm trying to do is make this look cleaner when the selections are made. What I mean is, for example, if you select 'Cider' I would like 'Bootled In?' to align with 'Total Cost' field on the left and have it show 'Bottled In?' along the top of the form field. I think this requires some JavaScript. Also, if you select 'Spirits', I would like for 'Made Outside N.A., Mexico?' to align with 'Total Cost' on the left as well.
test.php
templatemo-style.css
config.js
Now what I'm trying to do is make this look cleaner when the selections are made. What I mean is, for example, if you select 'Cider' I would like 'Bootled In?' to align with 'Total Cost' field on the left and have it show 'Bottled In?' along the top of the form field. I think this requires some JavaScript. Also, if you select 'Spirits', I would like for 'Made Outside N.A., Mexico?' to align with 'Total Cost' on the left as well.
test.php
templatemo-style.css
config.js
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You likely want to run that onload too in case they reload the page
ASKER
I got it to hide thanks. But, when I select 'Wine' for example, how can I move it up so it aligns evenly with
'Total Cost'.
'Total Cost'.
ASKER
It seems to work in IE but not in firefox
ASKER
I got it to work. I made a div tag for each field. Thanks......