Hi!
I've a form with four dropdown: A, 1, 2 and 3 (1, 2 and 3 are hidden).
When a user make a choice in A, one of the other dropdown becomes visible (ex: 1). When the user make a choice in this dropdown a lot of field (text and dropdown) are shown.
If the user change his choice in 1, the visible fields change.
If the user change his choice in A (ex: 2), every fields return invisible except 2. When the user make a choice in 2, others fields are shown, but some are the same for 1 and 2 (or 2 and 3, or 3 and 1, but not for 1, 2 and 3). So i need to clean every fields when A changes.
In CF5 i've a simple js script to do that, like:
In CF6 (every things is the same: name, id, etc.) it works only for the text fields.
I've tried also
What am I doing wrong?
There's another way?
Thank you all!
I've a form with four dropdown: A, 1, 2 and 3 (1, 2 and 3 are hidden).
When a user make a choice in A, one of the other dropdown becomes visible (ex: 1). When the user make a choice in this dropdown a lot of field (text and dropdown) are shown.
If the user change his choice in 1, the visible fields change.
If the user change his choice in A (ex: 2), every fields return invisible except 2. When the user make a choice in 2, others fields are shown, but some are the same for 1 and 2 (or 2 and 3, or 3 and 1, but not for 1, 2 and 3). So i need to clean every fields when A changes.
In CF5 i've a simple js script to do that, like:
document.getElementById("field_id").value = "";for every fields. The script worked for the text fields and for the dropdown fields.
In CF6 (every things is the same: name, id, etc.) it works only for the text fields.
I've tried also
document.getElementById("field_id").selectedIndex = "0";or
document.getElementById("field_id").selectedIndex = 0;they work perfectly with a not CF form but not in CF.
What am I doing wrong?
There's another way?
Thank you all!