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

Question

Question

Make all elements read only in Form

asked on August 25, 2017

How can I make the whole form read only in Java script without selecting individual fields? Is it possible to make entire form read only?

 

Thanks

Priya

0 0

Answer

SELECTED ANSWER
replied on August 25, 2017 Show version history

Hi Priya,

Here's some Javascript I got working to your description:

$(document).ready(function () {
  $('.cf-page input').each(function () {
    $(this).attr('readonly', 'True').addClass('readonly');
  })
});

Edit: Note that adding sections also makes it easier to make multiple fields read-only. If you're not using any sections at all, you can have a hidden section at the top of your form and check "Read-only" under section options.

3 0
replied on August 25, 2017

Thanks, will try.

 

Priya

0 0
replied on October 4, 2019

Instead of making the whole form read-only, can this code be customized to make a few fields read-only? I noticed that workflow is not processing my fields that are manually set to read only, i'm hoping by having JS set them as read only, WF will pick the contents. 

0 0

Replies

replied on August 25, 2017

Does it have to be in JavaScript? There is an option when configuring a User Task to make the entire form Read-Only for that user task. Would that work?

0 0
replied on August 25, 2017

Thanks. We are seeing some issues in Forms 10.2.1 when we use that option in User Task. So, we would like to make the whole form read only in Java script.

 

Thanks

Priya

0 0
replied on August 25, 2017

What types of fields are on your form?

Also, I'm curious what kinds of issues you are seeing when using that option?

0 0
replied on August 25, 2017

Thanks. The field rules are not working properly if we set that option. Thanks.

 

Priya

0 0
replied on August 25, 2017

What types of fields are on your form?

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

Sign in to reply to this post.