Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

how to make textfield non editable in dialog box

Avatar

Avatar
Validate 10
Level 2
amangoyal15
Level 2

Likes

5 likes

Total Posts

40 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
amangoyal15
Level 2

Likes

5 likes

Total Posts

40 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
amangoyal15
Level 2

07-11-2016

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.

Replies

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

08-11-2016

Hi,

Touch UI or Classic UI?

Avatar

Avatar
Validate 1
Level 7
Jitendra_S_Toma
Level 7

Likes

71 likes

Total Posts

615 posts

Correct Reply

84 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 7
Jitendra_S_Toma
Level 7

Likes

71 likes

Total Posts

615 posts

Correct Reply

84 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
Jitendra_S_Toma
Level 7

08-11-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.

Avatar

Avatar
Validate 10
Level 2
amangoyal15
Level 2

Likes

5 likes

Total Posts

40 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
amangoyal15
Level 2

Likes

5 likes

Total Posts

40 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
amangoyal15
Level 2

08-11-2016

for classicUI

Avatar

Avatar
Validate 10
Level 2
amangoyal15
Level 2

Likes

5 likes

Total Posts

40 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
amangoyal15
Level 2

Likes

5 likes

Total Posts

40 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
amangoyal15
Level 2

08-11-2016

PFA .

I  am not getting any field like disabled for xtype

Avatar

Avatar
Level 1
Gaston_Abasto
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Gaston_Abasto
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
Gaston_Abasto
Level 1

12-05-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 ?

Avatar

Avatar
Validate 1
Level 8
MC_Stuff
Level 8

Likes

78 likes

Total Posts

467 posts

Correct Reply

158 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 8
MC_Stuff
Level 8

Likes

78 likes

Total Posts

467 posts

Correct Reply

158 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
MC_Stuff
Level 8

12-05-2017

Avatar

Avatar
Establish
MVP
Nupur_Jain
MVP

Likes

165 likes

Total Posts

186 posts

Correct Reply

76 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Establish
MVP
Nupur_Jain
MVP

Likes

165 likes

Total Posts

186 posts

Correct Reply

76 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile
Nupur_Jain
MVP

15-05-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

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

15-05-2017

You need to add that as a property with name disabled,  value 'true' and  type boolean.

Classic UI already has these available in framework

Avatar

Avatar
Level 1
riteshm19780411
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
riteshm19780411
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
View profile
riteshm19780411
Level 1

24-08-2017

Hi Amangoyal,

Add a boolean property like below :

properties :  readOnly type :Boolean value : true