I congratulate him on his book to buy, sorry for my English, Help, please I am beginner of ChronoForms and javascript, I'm doing a form of calls where the first part if you have no data (hung, wrong) desabilite the form. If the second part (human resources) to block only the first part (no data) but does not work
Here is the code
Here is the code
<div class="ccms_form_element cfdiv_radio" id="autoID-5616d8102c6488fd7d8d000698b51ab8_container_div">
<html>
<script type="text/javascript">
function disableCheck(field, causer) {
if (causer.checked) {
field.checked = false;
field.disabled = true;
}
else {
field.disabled = false;
}
}
function disableOthers(field) {
disableCheck(formulario.RH, field);
disableCheck(formulario.prospectus, field);
}
function disableUno() {
field = formulario.nodata
if (formulario.RH.checked || formulario.prospectus.checked) {
field.checked = false;
field.disabled = true;
}
else {
field.disabled = false;
}
}
</script>
<body>
<p>
<label>No data call</label>
<input type="hidden" name="nodata" value="" alt="ghost" />
</p>
<p> </p>
<div style="float:left; clear:none;"><input type="radio" name="nodata" id="nodata_test" title="" value="test" class="" "disableOthers(this) />
<label for="nodata_test">test call</label>
<input type="radio" name="nodata" id="nodata_hung" title="" value="hung" class="" "disableOthers(this)/>
<label for="nodata_hung">hung</label>
<input type="radio" name="nodata" id="nodata_wrong" title="" value="wrong" class="" "disableOthers(this) />
<label for="nodata_wrong">wrong number<br>
<br>
<br>
<br>
</label>
</div><div class="clear"></div><div id="error-message-nodata"></div></div><div class="ccms_form_element cfdiv_radio" id="autoID-5f603d52a9be0343eb5af5bf08f9091f_container_div"><label><br>
<br>
<br>
<br>
<br>
RH</label><input type="hidden" name="RH" value="" alt="ghost" />
<div style="float:left; clear:none;"><input type="radio" name="RH" id="rh_inf" title="" value="INF" class=""
onClick="disableUno()" />
<label for="rh_inf">report</label>
<input type="radio" name="RH" id="rh_que" title="" value="Que" class="" onClick="disableUno()"/>
<label for="rh_que">complaint</label>
</div><div class="clear"></div><div id="error-message-RH"></div></div><div class="ccms_form_element cfdiv_checkbox" id="autoID-73348d574ed5ba569d0fda3fea9f2dd4_container_div">
<p>
<input type="hidden" name="prospectus" value="" alt="ghost" />
</p>
<p> </p>
<p>
<input value="1" title="" type="checkbox" name="prospectus" id="prospectus" class="label_left" onClick="disableUno()" />
<label for="prospectus">prospectus</label>
</p>
<div class="clear"></div><div id="error-message-prospectus"></div></div><div class="ccms_form_element cfdiv_textarea" id="autoID-e39e62a8c4f16e9e9e1aba4f46861826_container_div">
<p>
<label>name</label>
<textarea cols="" rows="" class="" title="" name="name"></textarea>
</p>
<p> </p>
<div class="clear"></div><div id="error-message-name"></div></div><div class="ccms_form_element cfdiv_submit" id="autoID-0b99c88e6074b9f6b37a5b8300912a91_container_div"><input name="submit" class="" value="submit" type="submit" />
<div class="clear"></div><div id="error-message-submit"></div></div>
</body>
</html>