You are viewing limited content. For full access, please sign in.

Question

Question

Using selection box to enable or disable a field does not carry lookup information to the second Form when field is disabled.

asked on May 11, 2016

A client has a Form that uses and yes/no selection to determine if a phone number needs to be updated in a SQL table. This number is populated when a user id is entered at the beginning of the form. when no is selected the field stays disabled so no one can change it. When this is done the phone will not carry over to the second form. When yes is selected the field is enabled so changes can be made. The phone number is carried over at this point due to the field being enabled. Does anyone have any thought on how to get the phone number to carry over to the second form even when the field is disabled?

 

Here the the java we are using:

// Write Protect Student Cell

 

$(document).ready(function() { 

  $('.cell input').attr('disabled',true); 

});

 

$(document).ready(function () {

  $('.changecell input').change(function () {

       $(".changecell input:checked").each(function(){

    if ($(this).val() == "Yes")

    {

    $('.cell input').attr('disabled',false);

    }

    else { 

      $('.cell input').each(function() {

      $(this).attr('disabled',true);

    });

       } 

    });

  });

});

// End Write Protect Student Cell

 

Thank You,

0 0

Answer

SELECTED ANSWER
replied on May 16, 2016

Field with "disabled" attribute set to true won't submit value to the back end. You can change "disabled" to "readonly" if you want the value to be submitted.

2 0
replied on May 17, 2016

This worked perfect. Thanks!

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.