Basically you would set the display property of the button field to show/hide it, but you'll need to provide more information about the exact conditions you want to use and what you want to use as the trigger, if you want more detailed help.
To get a button to hide itself when clicked, you can do:
// Mouse Up script - Hide this button
event.target.display = display.hidden;
This worked fine to hide the button. Want I would like to accomplish is based on the conditon of the EmplAge field, I would like the Validate button to appear but not get focus. Any suggestions?
As Gilad said, you need to provide more information. What type of field is EmplAge, and what are the conditions for showing/hiding the field? The code for showing it would be:
getField("Validate").display = display.visible;
or if you dont' want it to print:
getField("Validate").display = display.noPrint;
EmplAge is a text field. The field is populated from calculcations from a number of date fields. If EmplAge is greater than or = to 65, then I would like the Validate button to turn visible (show) . If the condition is not met, then the Validate button never appears.
Assuming you're currently using a custom calculation script for the EmplAge field, at the end you could add something like:
// Show/hide the Validate button based on the calculated age
getField("Validate").display = event.value >= 65 ? display.visible : display.hidden;
Use display.noPrint instead of display.visible if you don't want the button to print.