5 Replies Latest reply on Sep 30, 2010 4:22 PM by George_Johnson

    Remove bounding box if field is empty

    ktr927 Level 1

      I'm trying to find a script that I can place in a submit button that will check all fields and, if any are empty, hide the bounding box around them. I have no idea if this is even possible, I feel like it should be but I can't find anything that might work. I have a lot of text fields and they are all named very differently so I really don't want to have to set it to check each individual field, that would be a really long script!

      I hope the test form I included is ok, I couldn't find another way to attach it to the thread. It's just a small example of what my form is doing. As long as something is typed, there is no bounding box, but all of the empty fields have them, that's what I would like to go away. Thanks so much for your help! Hope I'm making sense, kinda new to acrobat so still trying to learn everything.

       

       

       

      RetrieveThumbnailDocument.png

        • 1. Re: Remove bounding box if field is empty
          George_Johnson MVP & Adobe Community Professional

          Are those fields currently set to be required? If so, this is controlled by a user preference (Edit > Preferences > Forms > Highlight Color).

          • 2. Re: Remove bounding box if field is empty
            ktr927 Level 1

            No, there's only a few fields in the form that are set to required, the rest are optional.

            • 3. Re: Remove bounding box if field is empty
              George_Johnson MVP & Adobe Community Professional

              To clarify, are you saying that the field border shows if the field is blank, but not if there is a field value? Was the form created in Acrobat or Live Cycle Designer?

               

              Are you using some code somewhere that shows/hides the field border? If not, I don't understand how that's happening. Can you post the form online so we can take a look?

              • 4. Re: Remove bounding box if field is empty
                Harris927

                I tried posting the form but its telling me the content of this image is not allowed, I'm not sure what's wrong. But it looks exactly like that picture I posted in the first post does, there's just a lot more fields. And no, I don't have any scripts in place to show or hide the fields. It actually looks fine until I open it in a program other then adobe, then the bounding boxes show. We have a scanning program we use to scan all our forms into our system and in that program is when it looks like that. That's why I was wanting to try a script that hides the empty fields completely, that way the scanning program won't be able to see them when the form scans. It's only when the fields do not have a value that the boxes show up. If there is something typed into the field then it looks normal, just like in the picture where I typed ''TESTING''. There is no bounding box in that field.

                I know I'm probably not explaining it well and its possible I'm just being way too picky, but I wanted to at least try and hide the fields that are not filled out when the user submits the form and at least see if that helps.

                • 5. Re: Remove bounding box if field is empty
                  George_Johnson MVP & Adobe Community Professional

                  It looks to me as though there is nothing you can do to the form in Acrobat to prevent the other program form displaying the fileds that way. It's probably just a quirk (bug) in that other program.