Why not just use a ComboBox?
The desire was expressed for a check box. With the regular
Acrobat check box being 2-cycle, I had to do something to make it 4-cycle.
If you need to use a checkbox, you can set up your checkboxes to use multiple values. Just create 4 checkboxes with the exact same name, and give each one a different export value.
Forgive my ignorance, but I envision 4 boxes in a row or a column for each check needed. This form is 20 pages of checks, up to 30 per page. Real estate wise, this wouldn't work. Please correct me if I'm wrong.
What you are trying to do can be done, just put the code in the mouseup of the text box. The problem is that when you mouse click on the text box, it becomes active. The script doesn't run until you exit the field, and it's a bit of an awkward interface.
The following (slightly cleaner) code, however, will change the value in the textbox if you pu it in the mousup event if you do find the combobox not to your needs:
var t = event.target.value
event.target.value = "P";
event.target.value = "O";
event.target.value = "X";
event.target.value = ""
Thank you Mark.
That code works well, although as you said it's a little cumbersome with having to tab out of the field to commit the value.