1 Reply Latest reply on Feb 27, 2014 8:29 AM by Efe

    Form field appearance coding

    Efe

      Hello everyone,

       

      First of all the softwares I use here : Indesign CS6, Acrobat Professional XI. They're all updated.

       

      If needed I have Illustrator cs6 and Photoshop cs6 too.

       

      Windows 7.

       

      I'm stuck with a form field. Here you can see a white box below. The file is designed in Indesign. It needs to be a fillable pdf. However the inputs will be 'A' or 'B' or 'C'. What I want is when I enter 'A' in the box, the white field in the roundedcornered rectangle go green. Yellow when 'B' and red when it's 'C'. If nothing is in the box, just plain white.

       

      I tried to convert the boxes to text fields in Indesign but it turned them into a plain form fields with perpendicular corners.

       

      I know Acrobat has no option to make form fields rounded. So I thought I might write a javascript code:

       

      1. I'll design three different coloured boxes in red, yellow and green. Put them on every single white field.

       

      2. Make them hidden (how ?) then when I enter 'A' to that form field, red box shows back behind the A, as to the B-yellow, C-green.

       

      OR

       

      1. I'll take the image below, delete the white fields and save as a transparent image (.png or something). Then put it on the pdf I've made.

       

      2. I'm not sure if this is possible with codes or not but here's the idea to make the colours: the form fields I've made should stay under this transparent image I've made, I'll write a code to fill the form field with red when it's A, and B-yellow, C-green etc.  As the form fields are behind that image, the rectangular form field will fill up with green but the rounded transparent hole in the image I've put will hide the extra green area outside the roundedcornered box.

       

      Unfortunately I've no idea about how to write javascript but I'm a fast learner trying to finish this until tomorrow.

       

      I'll be glad for any help, I'm running over all discussions by the way.

       

      2014-02-27_17-38-53.jpg

        • 1. Re: Form field appearance coding
          Efe Level 1

          If anyone looking for an answer to this, I've found a way.

           

          Add a button. From the properties of button, click add an icon and add the image I've made above (a png file, white boxes are transparent). Then arrange the size of it to fit your file. You can add form fields behind that button.