Expand my Community achievements bar.

SOLVED

Need script to alert user to fill in another field

Avatar

Level 2

Hello,

I have a drop down menu labeled certifications. Actually i have 9 of these. called certifications1 and so on. Anyway i just need something that detects if the user selects the menu item called proforma invoice that a little window will open reminding them to make sure the recievers name and email is entered. Thats all i am looking for. Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi,

Depending on your drop down setting, there will two different way to refer to the changed value.

If you're using just the "List Items" scripts will be;

if (xfa.event.newText == "proforma invoice"){
xfa.host.messageBox("make sure the name and email is entered");
}

If you're using "Specify Item values" with the "List Items", scripts will be;

if (this.boundItem(xfa.event.newText) == "1"){
xfa.host.messageBox("make sure the name and email is entered");
}

both scripts goes to change event of the drop down in javascript.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

Hi,

Depending on your drop down setting, there will two different way to refer to the changed value.

If you're using just the "List Items" scripts will be;

if (xfa.event.newText == "proforma invoice"){
xfa.host.messageBox("make sure the name and email is entered");
}

If you're using "Specify Item values" with the "List Items", scripts will be;

if (this.boundItem(xfa.event.newText) == "1"){
xfa.host.messageBox("make sure the name and email is entered");
}

both scripts goes to change event of the drop down in javascript.

Avatar

Level 2

Thanks for the help I will give this a shot.