how to make textfield non editable in dialog box | Community
Skip to main content
amangoyal15
Level 3
November 8, 2016

how to make textfield non editable in dialog box

  • November 8, 2016
  • 4 replies
  • 9580 views

In my dialog box , i am getting some value in textfield based on the value selected from dropdown . But currently i can make changes in retrieved values that i don't want. I need to make it non editable so that the retrieved value will remain as it is .

 

Edit- If i make it disable than that textfield name property will not saved as JCR property.

Please assist.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

edubey
Level 10
November 8, 2016

Hi,

Touch UI or Classic UI?

amangoyal15
Level 3
November 8, 2016

for classicUI

Jitendra_S_Toma
Level 10
November 8, 2016

amangoyal15 wrote...

In my dialog box , i am getting some value based on the value selected from dropdown . But currently i can make changes in retrieved values that i don't want. I need to make it non editable so that the retrieved value will remain as it is .

 

Hi,

if it is classic ui, you can set disabled (true) as a property in textfield xtype node.

Gaston_Abasto
May 12, 2017

Jitendra S.Tomar wrote...

amangoyal15 wrote...

In my dialog box , i am getting some value based on the value selected from dropdown . But currently i can make changes in retrieved values that i don't want. I need to make it non editable so that the retrieved value will remain as it is .

 

Hi,

if it is classic ui, you can set disabled (true) as a property in textfield xtype node.

 

and in Touch UI ?

January 22, 2021

Hi Gaston Abasto,

 

Did you find any resolution for this?

Nupur_Jain
Adobe Employee
Adobe Employee
May 15, 2017

Hi,

Unfortunately there is no widget property that can make your field non editable but there is listeners node available to take action on various widgets events. you can use loadContent event to explicitly set the field to readonly.

Here is the screenshot for your reference.

I have used simple jquery

function(field,record,path){ $("input[name='"+ field.name+"']"  ).attr("readonly",true); }

Hope this helps!

Thank you!

Nupur

Level 2
August 25, 2017

Hi Amangoyal,

Add a boolean property like below :

properties :  readOnly type :Boolean value : true