3 Replies Latest reply on Oct 11, 2013 1:30 AM by George_Johnson

    Read Only JavaScript

    msargent1

      New to JavaScript and need the help of those with knowledge

       

      I need to turn a field into read only once it has been populated

        • 1. Re: Read Only JavaScript
          George_Johnson MVP & Adobe Community Professional

          Can you provide more details? Are you saying that when a user enters a value in a field and commits it, you want the field to become read-only? If so, what happens if the user makes a mistake and wants to edit it?

          • 2. Re: Read Only JavaScript
            msargent1 Level 1

            I have a form that I want to populate certain field then email said form to my customer and have them complete the balance of the form and send back to me

             

            I want the fields that I populated to be read only when they are emailed to the customer

             

            I am building the form in Adobe pro XI

             

            I believe I can accomplish this by adding a java script to execute on mouse exit ( or onFocus / onBlur, although i don't really know how they work either) but I am new to all this

             

            Mike Sargent

            • 3. Re: Read Only JavaScript
              George_Johnson MVP & Adobe Community Professional

              Here's a link to a sample form that allows you to lock (set to read-only) certain fields by entering a password after clicking a button: https://workspaces.acrobat.com/?d=V6sp4ET*IvPDMfzFDwgYTw

               

              The code that controls everything is in a document-level JavaScript routine that gets called by the button. You can use a bookmark or link instead. The password is set to "password". This approach can't be considered secure, but it's often sufficient. It should get you started, but post again if you have any questions.