Hello,
I want to force the user to select a value in the drop-down list before she can move on the the next field. for instances, I have a drop-down list A, whose default value is empty. as the user clicks on the next field, I need to throw a warning that she needs to select the value for drop-down list A.
Thank you for your help.
Solved! Go to Solution.
Views
Replies
Total Likes
Yeah it would be the same idea basically. But you just need to decide where to have the event (on enter/ on exit of which field) and then use the same code where you can as many conditions as you like. For example,
if ( field1.isNull && dropdown1.isNull )
{
...
}
and so on.
Views
Replies
Total Likes
On the exit event of the drop-down list, you can do a test
if ( this.isNull )
{
xfa.host.messageBox("Select item from list");
}
You can place any other custom changes to the field inside the if statement to show the error.
Views
Replies
Total Likes
Hi,
Thank you. It looks like this only validate when I click on the field without entering/selecting then move on. Is there a way I can validate the field in a way that if I have field 1/dropdown1, then field 2/dropdown 2. If I click on field 2, there is a message popup saying that 'field 1/dropdown 1 can't be empty. Please make your selection before move on'.
Thanks.
Views
Replies
Total Likes
Yeah it would be the same idea basically. But you just need to decide where to have the event (on enter/ on exit of which field) and then use the same code where you can as many conditions as you like. For example,
if ( field1.isNull && dropdown1.isNull )
{
...
}
and so on.
Views
Replies
Total Likes
Ah, I see. Thank you. got it working now.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies