Skip to main content
Inspiring
August 4, 2017
Answered

Set Radio Button border color to transparent SaveAs

  • August 4, 2017
  • 1 reply
  • 2596 views

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...

This topic has been closed for replies.
Correct answer Bernd Alheit

Try this:

  if (f && f.type == "radiobutton") {

     f.strokeColor = color.transparent;

  }

1 reply

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
August 6, 2017

Try this:

  if (f && f.type == "radiobutton") {

     f.strokeColor = color.transparent;

  }

KortegaAuthor
Inspiring
August 7, 2017

That worked great, thank you.