4 Replies Latest reply on Mar 27, 2014 3:38 AM by AngelFord

    Filling up forms

    AngelFord

      problem is. I got three different textbox to fill in

       

      If I click on textbox 1 = It needs to have an Background color so the user can see where she/he is typing. Then if I press TAB to move at second TextBox..... I need the TextBox1 Background color to be just plain. No color. And I need the 2nd textbox background color to be there.

       

       

       


      And also, I need to have. When I saved it. After filling it up. The file cannot be edited and the Background color of all textbox will be just plain. Thanks!

        • 1. Re: Filling up forms
          JLogan3o13

          Here is what I would do, given the scenario you mention:

           

          • Create the three text fields
          • On the Actions menu of each field, select On Focus for the Trigger and Run a JavaScript as the Action.
          • Click Add...
          • Add the following to each:

           

          Choose whichever color you would like

          this.getField("<field name>").fillColor = color.blue;
          

           

          • Create a button
          • On the Actions menu of the field, select Mouse Up for the Trigger and Run a JavaScript as the Action.
          • Click Add...
          • Add the following:

           

           

          var x = this.getField("Text1");
          var y = this.getField("Text2");
          var z = this.getField("Text3");
           
           
          x.fillColor = color.white;
          x.readonly = true;
           
           
          y.fillColor = color.white;
          y.readonly = true;
           
           
          z.fillColor = color.white;
          z.readonly = true;
          
          
          

           

          You may want to add another field (hidden button or some such) that will allow you to make the form editable again, should you need to do so.

          • 2. Re: Filling up forms
            AngelFord Level 1

            So you mean the button you make me add it's like the SAVE button?

            • 3. Re: Filling up forms
              AngelFord Level 1

              I've tried it!Itworks. But now I need like after SAVING it, It will be converted to PDF file and the Button with this code

              var x = this.getField("Text1"); var y = this.getField("Text2"); var z = this.getField("Text3");   x.fillColor = color.white; x.readonly = true;   y.fillColor = color.white; y.readonly = true;   z.fillColor = color.white; z.readonly = true

               

               

              Will not be visible after saving it up? :O

              • 4. Re: Filling up forms
                AngelFord Level 1

                How to do it with Button? I need the buttons not to be editable like in textboxes