I am finding myself in need of some help, similar to this post I started last year:
http://www.chronoengine.com/forums/posts/f5/t88290/hide-show-form-fields-based-on-form-value-when-form-opens.html
I find myself needing to do something like this again. Here's what I have:
A form opens with a drop-down allowing a user to select "Yes" or "No". Depending on their answer, one of two sections in the form is displayed. One of these sections contains another "Yes/No" drop-down. If the user chooses "Yes" again, I need the form to display sections based on a form field. Each of the four sections is wrapped in a DIV with id, "travel1 - travel4". I have the following code, from last year, to display fields on form load:
This works fine on form load, but when I try to load this JS after the code necessary to perform the above-mentioned show/hide, it does not work. Is there any way to change this code to accomplish what I need?
Thanks!!
Rick
http://www.chronoengine.com/forums/posts/f5/t88290/hide-show-form-fields-based-on-form-value-when-form-opens.html
I find myself needing to do something like this again. Here's what I have:
A form opens with a drop-down allowing a user to select "Yes" or "No". Depending on their answer, one of two sections in the form is displayed. One of these sections contains another "Yes/No" drop-down. If the user chooses "Yes" again, I need the form to display sections based on a form field. Each of the four sections is wrapped in a DIV with id, "travel1 - travel4". I have the following code, from last year, to display fields on form load:
window.addEvent('domready', function() {
if ( $('var_trips').value == '1' ) {...
This works fine on form load, but when I try to load this JS after the code necessary to perform the above-mentioned show/hide, it does not work. Is there any way to change this code to accomplish what I need?
Thanks!!
Rick