Hello,
I have a form with javascript that hide or put visible a div when a input radio is checked
to be more clear, here is the part of the form
and the javascript
1- how can I do that with chronoforms ?
2- the other question is how can the field "raisonsociale" be required only if the input radio named "societe_particulier" is checked for "société" ?
I can't put it in the required, because it is not required if radio is checked for "particulier"
hope my explanations are enough clear
thanx in advance for your reply !
I have a form with javascript that hide or put visible a div when a input radio is checked
to be more clear, here is the part of the form
<td><p>
<label id="labsociete" style="font-weight:bold;">
<input name="societe_particulier" type="radio" value="societe" onclick="fradio(1,this.value);MM_changeProp('rs','','top','','DIV');MM_changeProp('rs','','top','','DIV')" />
Société</label>
<br />
<label>
<input name="societe_particulier" type="radio" value="particulier" onclick="fradio(1,this.value);MM_changeProp('rs','','top','','DIV');MM_changeProp('rs','','top','','DIV')" />
Particulier</label>
</p></td>
<td valign="top"><div id="rs" style="position:absolute; width:316px; height:24px; z-index:1;">
<input name="raisonsociale" type="text" id="raisonsociale" value="" size="50" />
</div></td>
and the javascript
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
var obj = null; with (document){ if (getElementById)
obj = getElementById(objId); }
if (obj){
if (theValue == true || theValue == false)
eval("obj.style."+theProp+"="+theValue);
else eval("obj.style."+theProp+"='"+theValue+"'");
}
}
1- how can I do that with chronoforms ?
2- the other question is how can the field "raisonsociale" be required only if the input radio named "societe_particulier" is checked for "société" ?
I can't put it in the required, because it is not required if radio is checked for "particulier"
hope my explanations are enough clear
thanx in advance for your reply !