Hi,
I'm trying to enable/disable the "Submit PMT ACN" button based on the user input. I've put code in change event of the field to activate the button but the the downside is that when user is typing in data into field, its loosing focus.
I tried to put in exit event but, the event is firing only when the user clicks somewhere outside of the field.
Disabled Button
Enabled Button
Can someone please help with some ideas to implement this?
Many thanks,
Sandeep
Views
Replies
Total Likes
In the change event of the text field, assuming your button is named Button1 and var checkTest value is password:
var startVal = "";
var checkThis = "";
var checkTest = "password";
if (this.rawValue != null) {startVal = this.rawValue;}
checkThis = startVal + xfa.event.newText;
if (checkThis === checkTest || xfa.event.newText === checkTest) {
xfa.host.messageBox("got");
Button1.presence = "hidden";
}
else {
Button1.presence = "visible";
}
this works by me (tested).
Hope it helps.
Views
Replies
Total Likes