Password-protect and hide one form field

Hi there,
I have been browsing through old forum discussions in search of an answer to my question.  A code George Johnson posted was really helpful, but there's  one more function I need to add to it and am struggling to figure it out on my own.
I am creating a PDF with form fields.  Different depts within the organization will review this PDF and pass it back and forth.  The Admin dept needs one text field called "internal comments" that they can password protect.  They'd like to be able to add text, then password-protect that one field so it's hidden for other depts who review this PDF.  Admin will need the copy to be visible to them when they enter their password. 
The script I found works really well (see below).  I set up a button to house the script, and when you click it, it locks and unlocks the "internal comments" text field with the password.  However, I can't figure out how to HIDE the "internal comments" text field after someone in Admin inputs their information.   I tried setting up a Show/Hide Field action, but I can't get it to work.  And I'm just not savvy enough to know how to alter the Javascript.
How can I specify that the "internal comments" text field be HIDDEN when a user enters their password for "deactivate this field", and VISIBLE when they enter a password for "activate this field"?
Any help would be greatly appreciated!
(function () {
    // Get one of the fields in the group
    var f = getField("private.name");
    // Determine new readonly state, which
    // is the opposite of the current state
    var readonly = !f.readonly;
    var readonly_desc = readonly ? "deactivate" : "activate";
    // Ask user for password
    var resp = app.response({
        cQuestion: "To " + readonly_desc + " the fields, enter the password:",
        cTitle: "Enter password",
        bPassword: true,
        cLabel: "Password"
    switch (resp) {
    case "your_password": // Your password goes here
        getField("private").readonly = readonly;
        app.alert("The fields are now " + readonly_desc + "d.", 3);
        break;
    case null : // User pressed Cancel button
        break;
    default : // Incorrect password
        app.alert("Incorrect password.", 1);
        break;

You could modify the section of code to something like:
        case "your_password": // Your password goes here
        getField("private").readonly = readonly;
        getField("private").display = readonly ? display.hidden : display.visible;
        app.alert("The fields are now " + readonly_desc + ".", 3);
        break;
So it toggles both the readonly property and the display property.
Edit: corrected typo.

Similar Messages

  • Backup is locked with a password protect and i didnt set one...help

    HELP MY BACKUP IS PASSWORD PROTECTED AND I DIDNT SET ONE AND NOW I CANT RESTORE MY MUSIC/PICS/ETC.....

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • My adobe account was hacked and compromised, emails were sent out on one of my accounts.  I changed my adobe password, when I scan my computer, some adobe files are password protected and can not be scanned, is this normal?

    my adobe account was hacked and compromised, emails were sent out on one of my accounts.  I changed my adobe password, when I scan my computer, some adobe files are password protected and can not be scanned, is this normal?

    I have contacted them, but apart from letting them look at it and deal with it, is there anything I can personally do myself? Or is it just a matter of waiting for me now?

  • HT4901 My iPad was stolen. It is password protected and I locked it. So far no one has tried to turn it on. I would like to erase the content but am afraid that the "Find it' software would be diabled too. Can someone tell me if this is what happens?

    My iPad was stolen. It is password protected and I locked it. So far no one has tried to turn it on. I would like to erase the content but am afraid that the "Find it' software would be diabled too. Can someone tell me if this is what happens?

    If content is erased, then the ipad will no longer have  the Find My iPhone service turned on, hence can't be tracked.  But the thief will not be able to view your data/apps.  But thieves these days know about the service and can reset the device so that it is no longer tracked, although all data is erased anyway.  They don't care about getting at your data, only about keeping the device to sell or use it as their own.

  • How does one strip out all Live Cycle data from a PDF and rebuild the form fields in Acrobat?

    Someone in a different department built a bunch of forms in Live Cycle. We now need to make minor edits to these forms but we all have Macs and can't use Live Cycle. Currently our only option to change a date and a name on each form  is to buy a new Windows workstation, buy a copy of Live Cycle and train someone for it.
    I understand the Live Cycle technology and Acrobat technology for forms are somehow different but there must be a way to just strip out all the Live Cycle form programming so that I just have the bare PDF with the text and layout.  Then make the text edits and rebuild the form fields in Acrobat.

    It depends on your PDF. Is the PDF a static XFA or a dynamic XFA?
    You can check to see if the PDF is static/dynamic by clicking File=>Save As, and it should say static or dynamic PDF as file type.
    iText will work with Static XFA forms created in LiveCycle. Dynamic XFA forms are not supported.
    You can also submit XML data to a server side script and parse the XML data using C# system.xml.xmlreader.
    Another tool that may speed the development of the project is:
    http://www.fdftoolkit.net/
    Note: FDFToolkit.net utilizes iText Technologies.

  • Can Acrobat be made to verify one form field against another?

    Here is an interesting problem, and I'm wondering if Acrobat has the functionality to solve it.
    The sales department is holding up application processing time.  They either forget to fill in blocks of information, or they misspell the buyer's name (Billy on page 1 and William on page 4). 
    Can Acrobat be programmed to verify one form field against another in order to eliminate these errors?
    Thank you.

    I had considered this as well.
    That solution would work in an ideal situation.  In this situation, however, it would probably not be a final workable solution.  Consider the case above.  This organization needs the full legal name on the application.  However, in the first field our friendly sales department enters Billy (instead of William).  If the "duplicate field" solution was embraced, Billy would automatically be embedded and a denial instantly triggered.
    If one form field can be verified against another, then can I assume various formulas could be generated from that?
    If field A then (B and C and D)
    If not field E (then no B and no C)
    Is this also correct?

  • Password protecting and encrypting received pdf file

    Hello there,
    how can I password protect (and encrypt) a pdf file that I received from someone else? For example, I may get a copy of my tax return from my accountant that I don't want anyone else to see on my computer or when I back up contents of my computer online.
    I have only Adobe Reader 8 installed on my computer. So I am not writing these pdf files myself - I realize that then I would have full control over the security settings.
    Microsoft Word and Excel files I can password protect. How can I do this for "received pdf files"?
    Thank you for your help.

    You need Acrobat, not Reader.
    Be aware that even then, PDF security is easy to bypass.
    I use a Mac for the most part but isn't there any features in Windows that will allow you to protect folders?

  • Check the listener is password protected and admin restrictions on from OEM

    Hi All,
    Is there any way to check the listener is password protected and admin restrcitions are on from OEM?
    Thanks,
    Mahi

    mrak wrote:
    hi,
    if you try to run,
    lsnrctl status and get the error :
    TNS-01169: The listener has not recognized the password
    then it shows that the listener is protected.
    to proceed, issue:
    LSNRCTL> set password
    Password: <your password>
    you should be able to run lsnrctl status after this
    br,
    mrakBut beware that starting with 10g, the listener uses the same os authentication as sqlplus, so if your OS account is a member of the dba group, you will be able to run lsnrctl without supplying a password, even if the listener is password protected. So while the above error is proof of password protection, lack of the above error is is not necessarily proof of non-password protection.

  • My ipad is password protected and i can't remember the password.  when I try to restore it, the itunes restore plugin screen will not appear on my ipad.  I have tried to shut down, plug in, and hold down the home button method and get nothing.

    my ipad is password protected and i can't remember the password.  when I try to restore it, the itunes restore plugin screen will not appear on my ipad.  I have tried to shut down, plug in, and hold down the home button method and only get the password screen again on the iPad.  Any suggestions??

    tried all that and was looking good with new software etc downloaded and then got a message in iTunes."we're sorry we are unable to conitue with your activation at this time etc " tried process again and got to the same message. iPAD still has the connect to it tunes screen ..any suggestions?

  • Ipod says "ipod is disabled connect to itunes when I try to connect it says it is password protected and can't find it. but doesn't give me the option to enter the password

    ipod says "ipod is disabled connect to itunes when I try to connect it says it is password protected and can't find it. but doesn't give me the option to enter the password

    Place the iPod in recovery mode and then restore via iTunes. For recovery mode:
    iPhone and iPod touch: Unable to update or restore

  • If I open more than one tab and then sign out of a password protected site in one tab, it will log me back in if both tabs are not closed and I return to the site. How do I change this?

    If I open a firefox browser and then I were to open another tab (e-mail for example) which is a password protected website, and then I sign out of my e-mail in the tab and close that tab, I can still access my e-mail without having to re-enter a password by going back to the e-mail website from the brower that is still open.
    ex. If I open google and am looking at something so I open another tab to go to hotmail. I then sign out of my hotmail and go back to the google site. If I then go to hotmail from the google site, even though I have signed out it will take me back into my e-mail unless I have closed all tabs upon signing out.
    Is there a way to make it so that if you sign out in one tab it completely signs you out?

    Make sure that Firefox closes properly to prevent session restore from restoring a crashed session.
    *"Hang at exit": http://kb.mozillazine.org/Firefox_hangs
    *"Firefox hangs when you quit it": https://support.mozilla.org/kb/Firefox+hangs
    Use "Firefox/File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit") to close Firefox if you are currently doing that by clicking the close X on the title bar.

  • Is there any way to password protect access to a form?

    We are going to use a form for a part of a clinical study and there are only 4 persons that should be able to enter information into this specific form.
    I understand that I can choose to share the link to the form with only these appropriate persons but I want to know if there is any way I can password protect the access e.g. after they have clicked on the link, they need to write a password, then be able to fill in the form?
    Thanks!!

    Hi,
    This is not something we currently support but you can add or vote on feature ideas: http://forums.adobe.com/community/formscentral?view=idea
    If you need to add a new idea click "Create an idea" under "Actions" in the top right.
    Thanks,
    Josh

  • Protecting some of the form fields

    I have set up auto-populating of form fields in an Acrobat Pro 9.0 form. A selection from a drop down (a company name) auto-populates the address, phone number fields, etc. How can I lock or protect the address and phone fields so that someone can't manually change them? Thanks.

    Just make the fields read-only, assuming you never want to allow the user to enter their own values. You can do this using the tab of the Field properties dialog that shows the field name.

  • Validating and highlighting a form fields.

    Hi all!
    I have a form, with a lot of fields, which must be NOT blank. And they must NOT be highlighted.
    So, on the one hand: i have to make these fields required, for don't let users print the form with blank fields. But if I’ll do it with standard settings, the fields will be highlighted with a red color (default settings of the acrobat reader). Yes, these settings can be changed in Acrobat Reader, but as the form will be used by a lot of users - i can't force them all change their settings.
    On the other hand: If the form fields are set to be optional, then validation scripts don't work on empty fields.
    So, is there any ways to solve this problem?

    Well, then not only red borders disapper, but also the blue highlight of fields background, so, users can't see where to type text. And that is bad(
    So, the only way i can see - is to turn off highlight (app.runtimeHighlight = false;), and also, chance fields fillColor, like that:
    enter: this.fillColor = "255,255,255";
    initialize: this.fillColor = "204,215,255";
    exit: this.fillColor = "204,215,255";
    prePrint: this.fillColor = "255,255,255";
    But this way there will be a lot of "monkeyjob" to change color setting of every field...

  • Pupulating two database fields from one form field

    Hopefully an easy query for someone with more experience than
    me!!!
    I have set up a form (PHP page) to add new users to a table
    in a MySQL database. So far, so good.
    The problem is that I want to use the value entered in one of
    the form fields (Email) to populate two different fields in the
    table (username and email). I realise that this is redundant, but
    it is necessary for other reasons that I won't go into here...
    I've tried using a hidden input field for username, but I'm
    just not sure what I need to specify for 'value'...
    The code for the input field is:
    <input name="Email" type="text" class="RequiredInput"
    value="" size="32">
    and the code for the hidden input is:
    <input type="hidden" name="username" value=Email>
    As you can see, this puts the text 'Email' in the field,
    rather than the value of the Email input...

    When I try an post a reply with the code attached I get this
    screen:
    The page you requested could not be found on our web site.
    You may wish to try one of the following links:
    Search
    Search the Adobe web site.
    Adobe Homepage
    Go to the Adobe homepage.
    Macromedia Flash Player
    Download the Macromedia Flash Player.
    Broken Link?
    Send us an e-mail.
    When the forum's working again I'll have another go at
    posting the code...

Maybe you are looking for

  • Forgot username and password for data

    I inherited an iPad 2 from my mom, and she is no longer reachable.  I'm trying to change the data plan into my own name and CC, but I can't log in to change it.  Is there anyway to completely reset the iPad 2 data plan so that I can set up the data p

  • Issue with Interactive Report

    I have a report that grabs over 10,000 rows (it's an inventory). When I run it from sql plus, it is pretty fast. When I run it from a standard report, again it's pretty fast. However, my interactive report takes about 2 min to load. I did a p_trace a

  • 9iAS Portal intsllation question

    We are designing the technical architecture for a terabyte size data warehouse. We are proposing and end to end Oracle solution, uing 9iAS Portal for end user access to the warehouse star schema. Is it required that portal schemas (portal, portal_sso

  • Is there a way to e-mail Verizon?

    I want to send an e-mail to Verizon explaining how I would like SEC Network to work on WatchESPN, and also how they should add that channel and Fox Sports 2 in HD.  (Basically, they should have HD for all of their channels if they are available.) How

  • 2 iWeb formating questions..

    Hi, I am trying to figure out how I can edit the different pages on themes. I like the general layout, but as for the color highlights and borders, I would like to change or delete them. Also, how do I insert photos small and have them open large whe