AnsweredAssumed Answered

How to Prevent a Value to be Changed in HTMPL Form?

Question asked by Balram.Deswal on Mar 24, 2017
Latest reply on Mar 27, 2017 by Balram.Deswal

Hi Team,

 

I want to set the value of a field through javascript. After setting the value, I want that the user cannot be able to change its value.

 

When I am using the dtlTextbox, I am able to set its value (after binding it with attribute let's say zservicelevel) using the code:

document.main_form.elements["SET.zservicelevel"].value="XYZ";

 

But the disadvantage of this is that user can change its value on front end after it is set by javascript call.

 

When I am using dtlReadonly field, I am not able to set its value using javascript like this:

document.main_form.elements["SET.zservicelevel"].value="XYZ";

 

So kindly provide a way in which I can set the value in dtlReadonly field or make the textfield to be in readonly mode.

 

Thanks & Regards,

Balram

Outcomes