Hello all,
two senarios. I saw your FAQ to show/hide fields but its not working for me :-(
1. I want to hide/show a text field dependent on a radio button (see attached scressnhot 2.jpg)
2. I want to hide/show a text area dependent on a special checkbox in a checkbox-group (see attached screenshot 1.jpg)
regards,
oracle
two senarios. I saw your FAQ to show/hide fields but its not working for me :-(
1. I want to hide/show a text field dependent on a radio button (see attached scressnhot 2.jpg)
2. I want to hide/show a text area dependent on a special checkbox in a checkbox-group (see attached screenshot 1.jpg)
regards,
oracle
Hi oracle,
There's no useful information here. Please post the JavaScript you have used and the ids of the inputs involved.
Bob
There's no useful information here. Please post the JavaScript you have used and the ids of the inputs involved.
Bob
Hi Bob,
I want to hide/show a text field (in this case a date picker field) dependent on a radio button.
If i select the radio button "ja" the text field (date picker) should be visible. If i select "Nein" it should be hidden.
1. I add the Field Id "radio1" to the radio button field and Field Id "date1" to the datetime picker.
2. I create a "Load JS" Event and add this
(http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/2645-how-can-i-showhide-a-textarea-when-a-checkbox-is-clicked.html)
LOAD JS
I want to hide/show a text field (in this case a date picker field) dependent on a radio button.
If i select the radio button "ja" the text field (date picker) should be visible. If i select "Nein" it should be hidden.
1. I add the Field Id "radio1" to the radio button field and Field Id "date1" to the datetime picker.
2. I create a "Load JS" Event and add this
(http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/2645-how-can-i-showhide-a-textarea-when-a-checkbox-is-clicked.html)
LOAD JS
var checkbox_id, textarea_id, checkbox, textarea, div;
/* edit the next two lines to match the ids of the elements in your form */
checkbox_id = 'radio1';
textarea_id = 'date1';
window.addEvent('domready', function() {
checkbox = $(checkbox_id);
textarea = $(textarea_id);
div = $(textarea_id+'_container_div');
div.dissolve();
showHide();
checkbox.addEvent('click', showHide);
});
function showHide() {
if ( checkbox.checked ) {
div.reveal();
textarea.disabled = false;
} else {
div.dissolve();
textarea.value = '';
textarea.disabled = true;
}
}
Hi again,
if i open the "test form" page its working! But on my website not :-(
Is there a javascript conflict?
regards,
oracle
if i open the "test form" page its working! But on my website not :-(
Is there a javascript conflict?
regards,
oracle
Hi oracle,
Is the MooTools More library being loaded on your page? Please post a link to the form so I can take a quick look.
Bob
Is the MooTools More library being loaded on your page? Please post a link to the form so I can take a quick look.
Bob
http://aerorefund.com/flug-verspätet.html
Please delete the link after your check thanks oracle
Please delete the link after your check thanks oracle
Hi oracle,
In the JavaScript the checkbox id is shown as checkbox1 - but I don't' see any checkbox with this ID in the form. I also didn't find the 'dissolve' error??
Bob
In the JavaScript the checkbox id is shown as checkbox1 - but I don't' see any checkbox with this ID in the form. I also didn't find the 'dissolve' error??
Bob
Hi Bob,
sorry i have changed the Checkbox to a Checkbox Group. In the Checkbox Group i have added the ID "checkbox2". If you flag the Checkbox "Anderer Grund" the textarea should be visible. Can you help me here?
I have added the normal Checkbox with id "checkbox1" again for testing!
best regards,
oracle
sorry i have changed the Checkbox to a Checkbox Group. In the Checkbox Group i have added the ID "checkbox2". If you flag the Checkbox "Anderer Grund" the textarea should be visible. Can you help me here?
I have added the normal Checkbox with id "checkbox1" again for testing!
best regards,
oracle
This topic is locked and no more replies can be posted.