JavaScript, protecting and opening field problem

I have a form with two fields that I don't want the user to fill out. The first txtCIC of field is at the top of the form and occurs only once. The second field txtPICode is an instance of line that the user creates the need. I have another field identified for the person who manages the form to access these two fields protected by entering a code. After update of these two areas, the code is removed in order to protect the fields again.

I have inserted the script into the layout event: loan.

if (this.rawValue == '1234') { }

PR20. Body.sfFrame.sfProperty.txtCIC.access = 'open '.

PR20. Body.sfFrame.sfRows.txtPICode.access = 'open '.

}

else {

PR20. Body.sfFrame.sfProperty.txtCIC.access = 'protected ';

PR20. Body.sfFrame.sfRows.txtPICode.access = 'protected ';

}

The script prevents entry at both fields until the value "1234" is entered and removed. My problem is that if I create more than one instance only one rank one is protected.

Can someone help me please?

Hello

This requires a loop to search for all instances of the fields you want.

Place this script in the event: exit.

var nRow = xfa.resolveNodes("PR20.Body.sfFrame.sfProperty[*]");
var nTestValue = "1234";

for (var i = 0; i < nRow.length; i += 1) {
          nRow.item(i).txtCIC.access = this.rawValue === nTestValue ? "open" : "protected";
          nRow.item(i).txtPICode.access = this.rawValue === nTestValue ? "open" : "protected";
}

Tags: Adobe LiveCycle

Similar Questions

  • SCSI address and null field problems when adding disks

    I had a spreasheet and requires up to 6 drives to be added to a list of virtual machines.

    vmname hdd1, hdd2, hdd3, hdd4, and hdd5, hdd6. I then want to run another command if hdd2 is lets say its to return "two disc exists."

    HDD1 must always be mapped to scsi 0:3.

    HDD2 must always be mapped to scsi 0:4 etc..

    but some time ago a hdd1 and a hdd3 and hdd6 but no hdd2 or hdd 4.

    I have two problems

    I don't know how to make sure the player is assigned to writing scsi address.

    I know how to do or not to do things if the fields are null or not.

    Help, please.

    You can specify a SCSI nummer if you add a drive hard using the vSphere API:

    $spec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $spec.deviceChange = New-Object VMware.Vim.VirtualDeviceConfigSpec[] (1)
    $spec.deviceChange[0] = New-Object VMware.Vim.VirtualDeviceConfigSpec
    $spec.deviceChange[0].operation = "add"
    $spec.deviceChange[0].fileOperation = "create"
    $spec.deviceChange[0].device = New-Object VMware.Vim.VirtualDisk
    $spec.deviceChange[0].device.key = -100
    $spec.deviceChange[0].device.backing = New-Object VMware.Vim.VirtualDiskFlatVer2BackingInfo
    $spec.deviceChange[0].device.backing.fileName = ""
    $spec.deviceChange[0].device.backing.diskMode = "persistent"
    $spec.deviceChange[0].device.backing.split = $false
    $spec.deviceChange[0].device.backing.writeThrough = $false
    $spec.deviceChange[0].device.backing.thinProvisioned = $false
    $spec.deviceChange[0].device.backing.eagerlyScrub = $false
    $spec.deviceChange[0].device.connectable = New-Object VMware.Vim.VirtualDeviceConnectInfo
    $spec.deviceChange[0].device.connectable.startConnected = $true
    $spec.deviceChange[0].device.connectable.allowGuestControl = $false
    $spec.deviceChange[0].device.connectable.connected = $true
    $spec.deviceChange[0].device.controllerKey = 1000
    $spec.deviceChange[0].device.unitNumber = 5
    $spec.deviceChange[0].device.capacityInKB = 1048576
    
    $vm = Get-VM -Name MyVM
    $vm.ExtensionData.ReconfigVM_Task($spec)
    

    The above code adds a hard drive with number 5 on the SCSI to a virtual machine called MyVM. The line:

    $spec.deviceChange[0].device.unitNumber = 5
    

    sets the number of SCSI to 5. A value of 0 in the number 0 SCSI: 5 is defined by the SCSI controller. So if you have a SCSI controller then the first number will always be 0.

    I don't know what you mean with "I know not how to do or not to do things if the fields are null or not.".

  • I'm having a problem when I open My Documents, the window opens and looks great, I can go to any folder and open it and all is well again

    I'm having a problem when I open My Documents, the window opens and looks great, I can go to any folder and open it and everything is well again, however if I then opened my pictures, and then open a file... some files, less than a second after they are open [and the pictures show] will make the window My Documents to disappear also all the desktop icons disappear the computer will then will reset it self , add all the icons and waiting for me to do something.

    I have no idea where to start looking for this problem.
    I do not have a disk operating system is
    When I try to save an attachment, as in email, Explorer opens, I choose a location to save it, then immediately Expolrer closed! I can't save an attachment

    Hello Philipwk,

    Thank you for your message.  Please provide comments to a few questions so that we can better help you get your problem solved.
    1. are there recent changes made to your system, namely the hardware or the software?
    2 How long present this problem?
    Here are two methods to try, please try in order.  If a system restore fix the problem, do not perform step 2.
    Step 1:
    Run a system restore to before that was the problem.  Please click the link below to get instructions from system restore.
    Step 2:
    Create and test the new user profile.
    Click 'Start' > right click on 'My computer' > select 'manage '.
    Double-click 'Users and groups' > below, select "users".
    In the pane, right click on the space empty and select 'new user '.
    Enter the identification information you will retain and select OK
    Right-click the user account that you just created, and then select "Properties".
    Select the tab "member of" > click on "add".
    Type Administrators in the field and select "check name".
    Once administrators is added, click OK
    Disconnect and connect again your new account, opening pictures with your new trial account.  You can even browse your other photo folder by going to the following location:
    c:\Documents and Settings\ (user account) \My Documents\My images
    If it works, your profile has been altered somehow.  You can then start to copy your data from your old profile to it.
    Please let us know if it did or did not work for you.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Acrobat Reader DC works fine and opens a PDF file without problem - until I have a word document open as well-, then the PDF file crashes. I can't open a PDF file, a word document is also open.

    Acrobat Reader DC works fine and opens a PDF file without problem - until I have a word document open as well-, then the PDF file crashes. I can't open a PDF file, a word document is also open.

    For troubleshooting, you can disable the Protected Mode (https://helpx.adobe.com/reader/using/protected-mode-windows.html#id_94783) and see if that solves the problem. If the problem persists, please re-enable the Protected Mode to improve safety.

    Let us know how it goes.

  • Password-protect and hide a form field

    Hello

    I was looking through old discussions in the forum looking for an answer to my question.  A code of George Johnson was really helpful, but there is a function more that I have to add to it and am struggling to figure out on my own.

    I created a PDF with form fields.  Different departments within the Organization will review this PDF and pass it back.  The Admin dept needs a text field called 'internal comments' that they can protect the password.  They would like to add text, then password - protect only one field so it is hidden for other departments that examine this PDF file.  Admin must copy either visible to them when they enter their password.

    The script that I found works really well (see below).  I created a button to hide 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' field after someone in the Admin entered their information.   I tried setting up a field to show/hide action, but I can't make it work.  And I'm not enough common sense to know how to change the Javascript code.

    How can I specify that the 'internal comments' field remains HIDDEN when a user enters his password to 'disable this field' and VISIBLE when they enter a password to "activate this field? '

    Any help would be greatly appreciated!

    ---

    (function () {}

    Get one of the fields in the Group
    var f = getField ("private.name");

    Determine the new State readonly, which
    is the opposite of the current state
    var readonly =! f.ReadOnly;

    var readonly_desc = readonly? 'disable': 'enable '.

    Request user password
    Var RESP = app.response({)
    cQuestion: 'To' + readonly_desc + "" fields, enter the password: ","
    CTitre: "password",
    bPassword: true,
    cLabel: 'password '.
    });

    switch (RESP) {}

    case 'votre_mot_de_passe': / / your password goes here
    getField("private").readonly = readonly;
    App.Alert ("the fields are now" + readonly_desc + "d", 3);
    break;

    zero case: / / the user pressed the Cancel button
    break;

    default: / / wrong password
    App.Alert ("bad password.", 1);
    break;
    }

    })();

    You need to change two lines separated as follows:

    var readonly_desc = readonly? 'lock': "unlock";

    App.Alert ("the fields are now" + readonly_desc + "Ed", 3);

  • How can I solve the problem of a pop window that appears whenever firefix titled load [Javascript Application] and said: "balance.balance is undefined".

    The little ' [Javascript Application] and balance.balance is not defined ' pop-up window is followed by a pop up that shows a sign of prudence and the number 3. They repeatedly pop up when I click on the button OK or X, I have to click 10 times until they disappear. Then, Firefox seems to work normally until I exit and try to come back later to Firefox.
    I uninstalled Firefox and reinstalled without effect. I also ran a convenience store that seemed to refer to distance to this problem with no effect.
    This does not happen when I load Internet Explorer or Google Chrome. Except for this issue, I prefer Firefox over one or the other.

    Hello, you can try to reproduce this behavior when you start firefox in safe mode, once? If not, probably an addon intrudes here...

    Troubleshoot extensions, themes, and issues of hardware acceleration to resolve common problems of Firefox

  • Are there problems with OS 10.11.4 and opening?

    Are there problems with OS 10.11.4 and opening?

    Upside down images in the mode list. There is no hope of any problem opening fixing. There will be no further development.

  • Using Autodesk Architecture 3.3 and opening a working file, I get the error message error "there was a problem sending the command to the program".

    When using Autodesk Architecture 3.3 and opening a working file, I get the error error message "there was a problem sending the command to the program". What does that mean? At the same time (or nearly the same time) trying to create a pdf from a drawing file is suspended the program autodesk. These two worked before.

    Hello

    The question you posted would be better suited to the Forums from Autodesk. I suggest you post here for better support.

    Here is a link:

    http://forums.Autodesk.com/

  • my stepson took an old pc to his new place in another city, it's password protected and we don't remember the password how we can solve this problem?

    my stepson took an old pc to his new place in another city, it's password protected and we don't remember the password how we can solve this problem?

    Keep passwords secure - Microsoft on passwords strategy
    http://support.Microsoft.com/kb/189126

  • I have a Canon Eos 6 d camera and Lightroom 5 and my Lightroom 5 could not detect and open a RAW file in my computer, please help me solve this problem

    I have a Canon Eos 6 d camera and Lightroom 5 and my Lightroom 5 could not detect and open a RAW file in my computer, please help me solve this problem

    Hi soewandichan,

    Please make sure that Lightroom is far, i.e. Lightroom 5.7.1.

    Also, please copy the images from the card, and then paste them into a folder on the desktop and then try and import them into Lightroom.

    Kind regards

    Tanuj

  • I bought a book of game Google and downloaded the CMHA on my desk. When I try and open it with my Adobe Digital Edition, I get the error message "license make mistake. "License server communication problem: E_Stream_Error.

    I bought a book of game Google and downloaded the CMHA on my desk. When I try and open it with my Adobe Digital Edition, I get the error message "license make mistake. "License server communication problem: E_Stream_Error.

    Response to SMcLeod8:

    Hello, I managed to solve my problem of E_STREAM_ERROR regarding the Google Play ebook. The short answer is to use ADE 4.0.3.

    When I met the problem of the E_STREAM_ERROR, it is with ADE 2.0.67532 on Windows 7 (and this had no problem handling the Kobo CMHA, OverDrive files, open a library and a sample epub BCAM from Adobe itself). This is why I would not upgrade my 2.0.67532 to the last 4.0.3. Instead, I used another Windows 7 PC and installed ADE 4.0.3. On my first try, I allowed the 4.0.3 without ID, and there was an error E-GOOGLE_DEVICE_LIMIT_REACHED. I then allowed with the Adobe-same ID * as my 2.0.67532 PC. It worked as I could get my epub from Google.

    As I don't expect a response from Adobe technical support, I guess that now Google license servers do not work with Adobe 2.0.3. I hope this will help you solve your problem - at least to get your ebook in ADE first.

    However, I would be careful replacing 4.0.3 of my 2.0.67532 I wouldn't be surprised if the latest version will not work with other suppliers of epub for social mobilization. For me the upgrade to the latest version of the software is never the best solution - it could solve a problem, but creates another.

    Note: * I understand that you can authorize up to a total of six computers with the same Adobe ID. Not sure that this policy is still standing.

  • Hi, I just bought a new iMac machine and I have problems to open my CS4. Whenever I click on the app, it is what appears... «license for this product has stopped working...»  ' Error: 150:30 ' Please help!

    Hi, I just bought a new iMac, and I have problems to open my CS4. Whenever I click on the app, it is what appears...

    «license for this product has stopped working...»  ' Error: 150:30 ' Please help!

    Hello

    See help here https://helpx.adobe.com/x-productkb/global/error-licensing-stopped-mac-os.html

    ^ Ani

  • In fact, I have problem in adding music to be played across all folios, the problem happened when I simply lock the ipad and open it, the publication is always open and I can browse, but the music stops and cann't continue. How can I solve this t

    In fact, I have problem in adding music to be played across all folios, the problem happened when I simply lock the ipad and open it, the publication is always open and I can browse, but the music stops and cann't continue. How can I solve this problem to continue after the opening of the ipad and continue to navigate the digital publication.

    The background sound plays only if the application is open. Once the device is locked or the user switches to another application the audio will stop.

  • Please give me solution for my computer always view your computer have persist order check and solve the problem every time when I open my computer.

    When I start my system the output display poster always your computer have Persist modula order check and solve the Problem.How to solve this problem

    Permanently?

    Hello


    What operating system is installed on the computer?
     
    Note: install the drivers on the manufacturer's Web site

    Hope this information helps.
  • Downloading and opening and saving pdf attachments to emails problem

    I downloaded the adobe reader 8.0 software to save and open PDFs from attachments in emails. I received an email with a pdf attachment in my yahoo email. I tried the open and save the pdf attachment in the email, and the file is not down load or open or save.  My internet browser is internet explorer 8. My operating system is Windows Vista. My computer is a Dell.  I get no error message, attachment simply refuses to download or save or open.  I checked with the sender of the e-mail and its attachment of pdf file, and they didn't put no restrictions on download save or open the attached pdf file.

    Hello

    Download the latest Acrobat Reader which is 9.x

    Acrobat Reader
    http://get.Adobe.com/reader/

    Uncheck the Google toolbar, unless you want really (not recommended)

    Download - SAVE - go to where you put it-click on - RUN AS ADMIN

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

Maybe you are looking for