Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Drop-down menu: lock after choice is made?

Avatar

Former Community Member

Is it possible to lock the choice in a drop-down menu after it is made, so when the document is saved and then opened again, the choice cannot be changed?

LC ES2 9.0.0, Win 7

1 Accepted Solution

Avatar

Correct answer by
Level 10

You could put something like the following on the initialize event of the field - the field will remain open until the file is saved with a value in the field, if there is no value the field will remain open when the file is saved and opened.

//form1.subMain.DropDownList1::initialize - (JavaScript, client)

if (!this.isNull){

this.access = "readOnly";

}

View solution in original post

3 Replies

Avatar

Former Community Member

Sure ...just lock the field on exit.

Avatar

Correct answer by
Level 10

You could put something like the following on the initialize event of the field - the field will remain open until the file is saved with a value in the field, if there is no value the field will remain open when the file is saved and opened.

//form1.subMain.DropDownList1::initialize - (JavaScript, client)

if (!this.isNull){

this.access = "readOnly";

}

Avatar

Former Community Member

Exactly what I was looking for.  Thanks!