Hi Mihaela,
I'm not sure whether we're talking about the same thing, but the code you gave doesn't work for me.
Thanks for the quick response!
The code given in an earlier post works for value3. If I could duplicate this for the other values I'd be OK to go:
function ff_selectlist_action(element, action)
{
switch (action) {
case 'change':
if(ff_getElementByName('selectlist').value == 'value3'){
ff_getElementByName('textfield1').value = '';
ff_getElementByName('textfield2').value = '';
ff_getElementByName('textfield3').value = '';
ff_getElementByName('textfield4').value = '';
}
break;
default:;
} // switch
} // ff_selectlist_action
Is it possible to duplicate line 5, only with another value? Everything I've tried breaks the function of the code.
Note: I'm currently working with a basic test form where I have a select list with two options. Each option has conditionally two text fields.
When someone chooses option 1, fills in a field and then changes to option 2 to complete the form, the info in the field from option 1 remains and gives false info to the Database.
I need to clear all fields upon changing the choice in the select list.
Thanks,
Laurie.