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

Question

Question

Required Fields Populated by Lookup Not Required On Second Lookup

asked on March 16, 2015 Show version history

I have discovered what I believe to be a bug with the lookup on a Laserfiche Form. We have a form that based on an employee's email address will return back the employee's name and employee ID. These fields are required fields and marked as read-only so a user cannot alter them. If I enter in the employees email address and perform the initial lookup, everything populates correctly. However, if I go back to the email address field that kicked off the look up and enter an invalid email address, the employee name and employee ID fields become blank, but are no longer required to have values in them to submit the form.

We are using Forms 9.2.1.1069

0 0

Replies

replied on March 18, 2015

You should not be able to configure the field as both required and read-only when design form. So you use custom JavaScript like following to mark the field as read-only? if that is the case, then the read-only fields actually are not required any more

$(document).ready(function(){
  $('.ro input').attr('readonly','True');
});

 

0 0
replied on March 18, 2015

I should have specified that we are using the following custom javascript to make the field read-only:

//make fields with read-only class read-only
  $('.read-only input').attr('readonly',true);
  $('.read-only select').attr('disabled',true);

So if using the above javascript makes it so the field is no longer required, is there a way to do both using javascript?

0 0
replied on April 15, 2015

What about disable input on the input element? Like this:

$(document).ready(function(){
   $(".read-only").keydown(function(e){
        e.preventDefault();
    });
});

For drop-down field, it should have no option value if there is no match.

Reference here:

http://stackoverflow.com/questions/12777751/html-required-readonly-input-in-form

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

Sign in to reply to this post.