Copy link to clipboard
Copied
Hi community,
I would like some help with some javascript ! The script I found helps me with marking circles over answers on a pdf that I have. However, I would like some help changing the code so that if I click on the button again, the circle disappears--to give people the option of selecting and deselecting. Any help much appreciated.
The code is below. Credit Source: http://khkonsulting.com/2016/11/mark-selected-options-with-circles-in-pdf-forms/#:~:text=On%20the%20...
var baseName; var currentState;
// get our name
var theName = event.target.name;
var re = /(.*)\.(.*)/; var ar = re.exec(theName);
if (ar.length > 0) {
baseName = ar[1];
currentState = ar[2];
// make this button visible
event.target.buttonSetIcon(this.getField("icon").buttonGetIcon());
event.target.buttonPosition = position.iconOnly;
// hide the other button var f_parent = this.getField(baseName);
var f = f_parent.getArray();
for (var i in f) {
if (f[i].name != theName) {
f[i].buttonPosition = position.textOnly;
}
}
}
this.calculateNow();
Copy link to clipboard
Copied
I would say that, in lieu of no one responding to your inquiry yet, that the adequate netiquette (or to show some respect to to the original author of this script) is to contact Karl Heinz Kremer at KHKonsulting LLC: khkonsulting@khk.net