I'm new to chronoform, and i'm using 4.0rc19.
i searched around the forums but didn't find something that can help me.
i'm using form wizard.
i have a radio button, where the 2 options are
-A: 1 Carton (12 Bottles)
-B: 1 Carton (24 Bottles)
and i have a select menu, Quantity.
how do i make the select menu is disabled by default, disabled when A is clicked and enabled when B is clicked.
attached is the screenshot.
thanks!
				
				
				
			i searched around the forums but didn't find something that can help me.
i'm using form wizard.
i have a radio button, where the 2 options are
-A: 1 Carton (12 Bottles)
-B: 1 Carton (24 Bottles)
and i have a select menu, Quantity.
how do i make the select menu is disabled by default, disabled when A is clicked and enabled when B is clicked.
attached is the screenshot.
thanks!
					Hi aalim,
There's nothing built into ChronoForms that will do this automatically; you'll need to create a little JavaScript to manage it.
Bob
				
				
				
			There's nothing built into ChronoForms that will do this automatically; you'll need to create a little JavaScript to manage it.
Bob
					Hye,
I put Load JS under show html at the event of on load.
below are the two JS that i tried:
(1) document.getElementById("quantity").disabled = true;
(2) document.forms[0].quantity.disabled=true;
both didn't disabled the select menu which name and id is quantity.
how do i put on click event to a radio? i tried somehting like this, my idea is when i click the radio, an alert appeared.:
fyi, my radio id is pack
can anyone help me on this?
				
				
				
			I put Load JS under show html at the event of on load.
below are the two JS that i tried:
(1) document.getElementById("quantity").disabled = true;
(2) document.forms[0].quantity.disabled=true;
both didn't disabled the select menu which name and id is quantity.
how do i put on click event to a radio? i tried somehting like this, my idea is when i click the radio, an alert appeared.:
$('pack').addEvent('click', function(){
    alert('clicked!');
});
fyi, my radio id is pack
can anyone help me on this?
					managed to solve this.
i use custom code. and insert the following code.
				
				
				
			i use custom code. and insert the following code.
<script>
window.addEvent('domready', function(){
  $('pack_h12').addEvent('click', function(){
    document.forms[0].quantity.disabled=true;
});
$('pack_h24').addEvent('click', function(){
    document.forms[0].quantity.disabled=false;
});
});
</script>
				This topic is locked and no more replies can be posted.
		
	
  