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

Question

Question

Form 10.2 - Javascript BUG?

asked on March 31, 2017

Hi all,

I make a form under Laserfiche Form 10.2

I need to put the field "nom" (1st one) as readonly using javascript.

This is my code

As you can see, I can modify the field.

I created a new form using Laserfiche From v9.2 and I have no difficulty ; I cant modify the field "test".

Is it a bug or do I need to do something on the version 10.2?

0 0

Replies

replied on April 3, 2017

Hi all,

I found how to do in LF v10.2.0.834.

This is my field

So this is my code

$(document).ready(function ()
	{ 
     	document.getElementById("Field8").readOnly = true;
	});

The id must to be like that "Field+number". Under my exemple, my form's Id is "q8" so my number is "8".

1 0
replied on March 31, 2017

I downloaded the hotfix (update 1)

https://support.laserfiche.com/kb/1013834/list-of-changes-for-laserfiche-forms-10-2-update-1-

This is didnt resolve my problem.

0 0
replied on March 31, 2017

Can you confirm that the javascript you're applying is to the same form you're testing? Also, can you confirm that "Nom" is actually Field1 on the form? Could it actually be some other field ID?

If you can get a screenshot of the entire "CSS and JavaScript" window in Forms where it shows the corresponding form and field IDs on the right, that would be helpful.

0 0
replied on March 31, 2017

A case has been opened with Laserfiche Support. The thread will be updated when a resolution is found. In the future, do NOT open a case and an Answers thread for the same issue unless instructed to in one or the other, to avoid duplication of posts and miscommunication.

0 0
replied on March 31, 2017

Alexander,

The Javascript is the same for form 1 and 2.

I did test with :

"#Field1", "#q1", "#nom", "#Target1",

".Field1", ".q1", ".nom", ".Target1"

"Field1", "q1", "nom", "Target1"

using double quote "" and simple ''

 

Some codes is working

For example this codes works :

document.getElementById("q1").style.display = "none";

 

James, sorry for the mistake but in my mind, the case is only for me and I would to share my solution to others. I will not do the same in the future.

0 0
replied on April 2, 2017

This works for me, as an attribute rather than as a property.

$(document).ready(function () { 
  $("#Field1").attr("readonly", true);
});

0 0
replied on April 3, 2017

Hi Matthew,

 

Thank you for your help.

But it still doesnt work for me.

 

What is your LF's version?

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

Sign in to reply to this post.