Hide the drop down list arrow once the field is filled

Avatar

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
mdawn50
Level 3

24-07-2015

I am creating a form that ultimately becomes a published page of directions. After the user selects an item in the drop down list, is there a way to make the arrow hidden. It would need to be redisplayed if the user click in the field again.

Thanks,

MDawn

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
mdawn50
Level 3

27-07-2015

Here is the script I put on the Exit event of the drop down list. Nothing is happening. I don't get any error messages either.

form1.#pageSet[0].Page1.deptList::exit - (JavaScript, client)

if(xfa.event.newText == "3")

     {deptList.access="readOnly";}

if(xfa.event.newText == "5")

     {deptList.access="readOnly";}

    

     if(xfa.event.newText == "7")

     {deptList.access="readOnly";}

    

     if(xfa.event.newText == "8")

     {deptList.access="readOnly";}

The numbers are the values, not the rawValue.

Thanks for your help.

MDawn

Answers (4)

Answers (4)

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

27-07-2015

to reshow the drop down arrow, in the enter event use this line

this.access = "open"

Avatar

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Validate 50
Level 3
mdawn50
Level 3

Likes

8 likes

Total Posts

346 posts

Correct reply

6 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
mdawn50
Level 3

27-07-2015

Well, I'm making progress based on your last email. I moved the script to the change event and it works perfectly. Now, I'm not sure how to get the ability to reshow the drop down arrow if the user re-enters field.I kept the script in the enter event. The numbers are actually the displayed value, not the rawValue. so that's working ok.

Thanks again for all your help.

MDawn

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

27-07-2015

Hi there,

the newText property returns the displayed value chosen, if you want the use the numbers, you should use rawValue if you have the property Specify item values checked

Also, the newText property should only be used in the "Change" event, in the exit event it only returns an empty string.

If you want to use a similar property to newText in the exit event, use DropDownList1.getDisplayItem(DropDownList1.selectedIndex);

But because you are using the numbers as conditions in your if statements, you should be using rawValue, and make sure the check box Specify item values is checked!

Hope this help!

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

27-07-2015

Hi there,

The only way I'd see this possible is:

on the Exit Event of the field, if a value is chosen, you set the access's field to be "readOnly"

on the Enter Event of the field, you set the access's field to be "open"

Hope this help!