This is the script of the KB article:
<script> jQuery(document).ready(function($){ var fieldID = 18; var showVal = 'Yes'; var $nextButton = $(".frm_button_submit"); //Hide next button by default if Yes is not already checked if (($("input[name^='item_meta[" + fieldID + "]']:checked").val() != showVal) && ($("input[type=hidden][name^='item_meta[" + fieldID + "]']").val() != showVal)) { $nextButton.css('visibility','hidden'); } $("input[name^='item_meta[" + fieldID + "]']").change(function(){ if ($("input[name^='item_meta[" + fieldID + "]']:checked").val() == showVal){ $nextButton.css('visibility','visible'); } else { $nextButton.css('visibility','hidden'); } }); }); </script>
$("input[name^='item_meta[" + fieldID + "]']").change(function(){
if ( $('#empty_field1_id').val() == '' && $('#empty_field2_id').val() == '' ) {
if ($("input[name^='item_meta[" + fieldID + "]']:checked").val() == showVal) {
$nextButton.css('visibility','visible');
} else {
$nextButton.css('visibility','hidden');
}
}
});
Thanks a lot @Victor Font !!
Please login or Register to submit your answer