I have a requirement to show three text boxes and make them mandatory on check of radio button else hide the text boxes.

I am able to show hide in New and Edit form. But on Disp read form I am not able to show hide text boxes on radio button check or uncheck:

<script src="//code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function() {

   $('nobr:contains("Description )")').closest('tr').hide();
   $('nobr:contains("Causes )")').closest('tr').hide();
   $('input:radio').on('change', function() {
      if($("span[title='Line of fire']>input").is(":checked")){
          $('nobr:contains("Description )")').closest('tr').show();
          $('nobr:contains("Causes )').closest('tr').show();
          $('nobr:contains("Immediate )")').closest('tr').show();

function PreSaveAction() {
var jq = jQuery.noConflict();
var txtTitle1 = jq(":input[Title='Description ']").val();
var txtTitle2 = jq(":input[Title='Causes ']").val();
var txtTitle3 = jq(":input[Title='Immediate']").val();
var r =(jq("span[title='Other']>input").is(":checked"));
if((txtTitle3 == "")&& r === true){
alert("Please enter Immediate)");
return false;


return true;


closed as unclear what you're asking by Ganesh Sanap, P S, Gaurravs, Aakash Maurya, Waqas Sarwar MVP Aug 1 at 19:43

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.