Copy link to clipboard
Copied
Creating Forms using Adobe Acrobat Pro 11
Forms will be run using Adobe Reader 11
I have a Form with some textfields and radio buttons.
Where I have used the border colors of each to "highlight" what should be filled in by the user.
But when the user hits a Submit button (which will saveAs), I want the border colors to change to white so on the final saveAs'ed document the textfields and radio buttons look "flat".
I have the javascript to change the border color of the textfields to white before I saveAs the form.
===========================================================
// Set Border Colors to White for all TextFields properties
for (var i = 0; i < vdoc.numFields; i++) {
// Get a reference to the current field
var f = vdoc.getField(vdoc.getNthFieldName(i));
// If the field is a text field, set these properties to these values
if (f && f.type === "text") {
f.textFont = font.Helv; // Helvetica
f.textSize = 0; // 0 = Auto
f.alignment = "center";
// No Border Color
f.strokeColor = color.transparent;
===========================================================
How do I change the border color of the radio buttons to transparent also before I complete the saveAs function?
Thank you...
Try this:
if (f && f.type == "radiobutton") {
f.strokeColor = color.transparent;
}
Copy link to clipboard
Copied
Try this:
if (f && f.type == "radiobutton") {
f.strokeColor = color.transparent;
}
Copy link to clipboard
Copied
That worked great, thank you.