Adobe is creating - JavaScript - read-only / gray fields according to the user's response

I hope someone here can help me!

I need to create an Adobe form where the answer to the first question greys out and makes some fields read-only.

I am aware that I need to write a Java Script for that, but how do I do this? I did research for the days, and I can't function.

Here is the example:

The question is "is - this project fall under standard terms? ' and if the answer is Yes - so many questions should be ignored, as if the answer is no, the questions must be answered.

I tried to have the first question as a checkbox, radio button and a drop-down with the 'yes' and 'no' option, but none of this seems to help.

Can someone help me understand what I need to do? PLEASE, I BEG YOU!

Thank you

It is quite simple and can be made much simpler if give you all the names of optional field of a common prefix using a hierarchical naming scheme. For example, if you use a prefix of 'optional' so that you have domain names like "optional.name", "optional.address", "optional.email", etc. (note that the period character is critical here), you can set fields in the group to read-only with a single statement. Similarly, you can set the background color or reset the group, which is a good idea when the fields turn off/on. For example:

var f_prefix = "optional";

// Get a reference to all of the "optional" fields
var f = getField(f_prefix);

// Set them all to readonly
f.readonly = true;

// Set the background color to gray
f.fillColor = color.gray;

// Reset all of the fields
resetForm([f_prefix]);

You can place this type of code in the mouse event to the top of a box, something like:

// Mouse Up script for check box
// If checked, certain fields should be disabled

var f_prefix = "optional";

// Get a reference to all of the "optional" fields
var f = getField(f_prefix);

// Reset the optional fields
resetForm([f_prefix]);

if (event.target.value === "Off") {
    // Enable the optional fields
    f.readonly = false;
    f.fillColor = color.white;
} else {
    // Disable the optional fields
    f.readonly = true;
    f.fillColor = color.gray;
}

Tags: Acrobat

Similar Questions

  • Define a field read-only under certain conditions in the table of the ADF

    Hi friends,
    I'm new to ADF. I created a page basic jsf and display of data from the countries in the table. I also have the createInsert and validation on the page buttons. When I click on create to insert a new record is created, and I am able to enter and save it with success. However, I want the records already entered to be read-only.

    Essentially, I want the user to enter details only by inserting the new record. Existing records or registered once newly created records should not be editable. I tried some things in the expression builder of the attribute read-only for the field, but this deos not work. Can anyone help me please with this.

    Thank you

    Using ADF BC?
    If so, check http://mjabr.wordpress.com/2011/07/15/control-row-updatability-part-2/

  • Create a read-ONLY access account, DOHAD

    People,

    We use the OID with OAM, as SSO at EBS.

    IO is 11.1.1.7.0.

    Can I create a read-only account in OID, this account can connect in DOHAD, to just able to do the read-only?

    Thank you

    Ashish

    People,

    Read this document, 746612.1 that will show you how to create an account only in OID.

    BUT also read this also: 1924840.1 very Important.

    Thank you

    Ashish

  • My doc says 'read only' how can I change the shape of change

    Hello

    I need assistance with reading only doc, how to change

    Right click the READ ONLY doc, select properties - uncheck the READ ONLY at the base of the window see if it can help

    You have this file on your local harddive? or you just try to change it on some network share drive, you know for your purposes of file protection, all files related to doc stay status read-only if someone else has already opened

    next time pls ask your question in an appropriate section of the forum in order to get a quick response, thanks

  • Impossible to turn off read-only - and I already checked the Security tab

    Hello, I use Vista Ultimate.  I'm on my home computer and have full administrative rights.  Have a big problem trying to get the recovery off the power on a personal folder read-only.  It is NOT a folder on a network or is a system folder.  When I go in the folder and click on the Security tab, ALL users have full right to make any changes.    No error displayed whenever I then deselect read only on the general tab, click on or .  But when I re - open the folder and check the properties, read-only is still active.  It's driving me crazy.  HELP!?!?!?!

    And Yes, I tried this:

    "To view or to remove the read-only or the attributes of system files in Windows Vista

    1. Click on start, run, type cmd and press ENTER...
    2. To view the syntax for the Attrib command, Type attrib------? at the command prompt.

    To remove the read-only attribute and to set the system attribute, use the following command:

    attrib - r + s drive:------------

    For example, to remove the read-only attribute and set the attribute to system for the C:\Test folder, use the following command:

    attrib - r + s c:\test

    Be aware that some programs may not operate correctly with folders for which the read-only attribute and the system attribute are granted. Therefore, use the following command to remove these attributes:

    attrib - r s by car:------------

    For example, to remove both the read-only and the attributes to system for the C:\Test folder, use the following command:

    attrib - r-s c:\test

    If the run command is not listed in the start menu, follow these steps:

    Click Start, click principally made programs, accessories, and then click Run."


    And get an error that says: parameter Incorrect Format.

    Have you checked to see if the files in the folder are effectively read-only or if the only problem is that the file is checked in read-only?

    You may need to go higher in the chain of record because some properties are inherited (see advanced security of the folder until you come to one where the special permissions list including all permissions that are inherited for administrators or your user account). It does not stick because you don't have the permissions and/or ownership to allow you to make the change.  You must have permissions to full right for all folders (both on the main page and in the special permissions list) and you will have to take possession of the records as well.  Then change the ownership and permissions for yourself and administrators and don't forget to check the box for all files and subdirectories.  This should give you what you need to make the changes.  Here is some information that might help.

    To view your permissions, right-click on the file/folder, click Properties, and check the Security tab.  Check the permissions you have by clicking on your user name (or group of users).  Here are the types of permissions, you may have:http://windows.microsoft.com/en-US/windows-vista/What-are-permissions.  You must be an administrator or owner to change the permissions (and sometimes, being an administrator or even an owner is not sufficient - there are ways to block access (even if a smart administrator knows these ways and can move them - but usually should not because they did not have access, usually for a very good reason).)  Here's how to change the permissions of folder under Vista:http://www.online-tech-tips.com/windows-vista/set-file-folder-permissions-vista/. To add take and the issuance of right of permissions and ownership in the right click menu (which will make it faster to get once it is configured), see the following article:http://www.mydigitallife.info/2009/05/21/take-and-grant-full-control-permissions-and-ownership-in-windows-7-or-vista-right-click-menu/.

    To solve this problem with folders, folders takeownership or the reader (as an administrator) and give you all the rights.  Right-click on the folder/drive, click Properties, click the Security tab and click on advanced and then click the owner tab.  Click on edit, and then click the name of the person you want to give to the property (you may need to add if it is not there--or maybe yourself). If you want that it applies to subfolders and files in this folder/drive, then check the box to replace the owner of subcontainers and objects, and click OK.  Back and now there is a new owner for files and folders/player who can change the required permissions.  Here is more information on the ownership of a file or a folder:http://www.vistax64.com/tutorials/67717-take-ownership-file.html. To add take ownership in the menu of the right click (which will make it faster to get once it is configured), see the following article:http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/.

    I hope this helps.

    Good luck1

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • problem with write access to truecrypt readers windows 7. The mounted drive is not writing priveliges. Read-only. Cannot change in the security permissions.

    problem with write access to truecrypt readers windows 7. The mounted drive is not writing priveliges. Read-only. Cannot change in the security permissions.

    Hi amcop4591,

    1. How is - that Mount you the drive on the computer?

    2 Di you use any third-party tool to mount the drive?

    I suggest that you remove the external drive using the disk management and check back later if you can change the permissions on the drive.

    If you change the permissions, make changes to the permissions on the drive and then mount the drive.

    Mount or dismount a drive

    http://Windows.Microsoft.com/en-us/Windows7/mount-or-dismount-a-drive

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • PCM - data import and fields defined by the user - model import or the XML API?

    Hello

    I am currently partially by an implementation of the PCM with my business and have created a few user-defined fields in the application companies. I have data from a form on the internet into a CSV file that I want then to eye-ball before loading of PCM.

    I created a copy of the "export contracts report template ' to include these fields defined by the user, but when I try to re - import the data, the user-defined fields are not populated.

    No one knows if the user-defined fields can be updated in PCM, and if so does to do through the functionality of the XML API?

    Kind regards.

    Published by: 914327 on February 14, 2012 03:39

    The simple answer is that the built-in import utility is designed to import a preset list of fields only and will not import your custom fields even if they are added in the import file, and you will need to use the API to import these fields.

    However, there are unsupported methods to import this data directly to the database, or to add custom fields as options available for import. I can tell you more about these methods on the forum offline if you are interested.

  • I need to make a required field 'A' if the user selects "OFF" in a ON / OFF dropdown

    I need to make it a required field 'A' if the user selects 'OFF' in a drop-down list box ON / OFF.

    Ideally, I would like to make several required fields - A, B, C, D, but I limit myself to one if someone can help me please.

    You must run a JavaScript script for action 'the blur '.

    If (event.value == "OFF") {}

    this.getField("A").required = true;

    this.getField("B").required = true;

    this.getField("C").required = true;

    } else {}

    this.getField("A").required = false;

    this.getField("B").required = false;

    this.getField("C").required = false;

    }

  • How to call user B to drop/create an indexes on a table owned by the user has?

    Hello!
    We have the following situation:
    = > user B has a table that has an index
    = > user connects to the database and must have sufficient privileges or the ability to drop/create an index for a table owned by the user B.
    Since there are several different schemas in the database, it is not possible to grant the privilege "to create any index' or 'delete any index '.
    for the user.
    = > to do even more complicated: the necessary procedure must not belong to user B

    I tried to solve this problem with a stored procedure (which belongs to user C). Why do we use user C? C the user has several packages,
    procedures and functions that get used by other users (for example for purposes of logging, refresh materialized views,...)

    So the logic is:
    = > user A calls user procedure C. In this procedure the call "run immediately" ALTER SESSION SET CURRENT_SCHEMA = B' "»
    is executed successfully. The next step, the < drop index B.i1 > statement would get executed. But this statement fails with the
    exception ' ORA-01031: insufficient privileges ".

    If this procedure is created in the schema of the user B then everything works fine - but because of our current design of the database, this procedure
    must belong to the user C.

    Does anyone know a solution to this problem?

    Any help will be appreciated

    Rgds
    JH

    I think you need the privilege DROP_ANY_INDEX directly to user C.

  • Open a read-only text field using the button and javascript

    Hello

    I have a form with text fields that I préremplira data. The text fields will be in read-only by default. I want to ensure that when a user wants to make changes, he will need to click on a button and in turn, background of the text field will become gray and he can make changes to the text field. I can already do gray running in background, but I can't make the text box open.

    This is the code that will run after the button is clicked:

    color.ltGray = new Array ("G", 0.75);

    this.getField('TestField').fillColor = color.ltGray;

    this.getField('TestField').access = "open";

    Background of the text box becomes gray, but it is always read-only. Any ideas?

    Thanks in advance!

    If you have created the form in Acrobat (as opposed to LiveCycle Designer), change the last line to:

    this.getField('TestField').readonly = false;

  • Set the following fields in 'read only' to take data from the first occurrence?

    Hoping that this can be easily done without the need for scripting.

    I'm working on creating a form of proposal. There are a few areas where I would like the first instance of an editable field, but the rest would be locked so that they are even taken out of the tab order.

    Example: On the first page, I have a field for the name of the company. This field is reproduced in the pages of the proposal. Each field has the same name. So all data have concluded one of them are dealt to each of them.

    Ideal solution: Front page field is editable, and is where data is entered. "All the following fields are defined as 'read only' and take their 'master' field data" so someone can't make a change to this form, for example, the third page and have this error repeated throughout the document.

    Is this possible?

    I use Acrobat Pro DC on Windows 7 pro.

    Thank you.

    You use a script to do it, but it's very simple.

    If the 'master' field is called "Text1", then enter this code in the calculation script customized for all other areas that need to have its value:

    Event.Value = this.getField("Text1").value;

  • How to create a read only user

    Hello

    Please, can someone tell me step by step with complete orders to create a single read user who only read only access to tables. functions and procedures but will b totally restricted to make changes or can create all new items etc.

    Hi Richa

    Steps to create read only user: -.

    CREATING USER

    IDENTIFIED BY

    DEFAULT TABLESPACE users

    TABLESPACE TEMPORARY temp2;

    GRANT CREATE SESSION, CONNECT to ;

    BEGIN

    FOR x IN (SELECT master, object_name FROM dba_objects owner WHERE IN ("SCHEMA1", 'SCHEMA2', "SCHEMA3") and object_type in ('TABLE', 'SEE'))

    LOOP

    RUN IMMEDIATELY ' GRANT SELECT ON ' | x.Owner |'. ' | x.object_name | » À ' ;

    END LOOP;

    END;

    /

    Concerning

    Jihane Narain Sylca

  • Adobe Audition CS6 exported read-only when I can't reach, but randomly

    I work for a company that uses Adobe Audition CS6 for some work. We export sessions on a share drive that can be pulled up in our automation programme. The problem is when the don't export that sometimes (did a test of 10 attempts from the same file, same settings, 7 3 traverse doesn't) it exports a read-only and will not pass by the reader on the part. He was suspended in limbo. I can't reproduce the problem at the request, it seems to be "random". This only started happening when we deployed PC updated.

    Then I fear that it is unlikely to be a problem with the codec WO. In this case we on this forum from a user to probably will not be much help. However, if you're lucky, the developers of the hearing look on this forum from time to time, as you will see from the other thread of WO users and may be able to get this looked in bug.

    It is also probably a good idea to publish it as a bug on the list of bugs to Adobe Audition. Pointing out the problem with WO may be a good one.

    Wishform - Adobe Audition

  • How do I format box for format read-only form fields.

    I am working on a form that has a check box N/A. I want that the checkbox is automatically selected when the form is opened and make the form read-only fields, then make the editable fields when the user disables the check box. The script that I use now is back. It makes editable forms when the n/d is checked and I would do the opposite of this. This is the script that I use now in the section mouse to the top of the box. Any help would be greatly appreciated.

    Script mouse to the top of the box

    getField("Name_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Address_4").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("City/State/Zip_4").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("License_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Issued_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Exp_5").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("DOB_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Phone_3").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Email_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Payment_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Deposit_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Exp_6").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Exp_7").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Gift_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Cash_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Carrier_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Policy_2").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Phone_4").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Exp_8").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Signature153").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Print").display = event.target.value = "Off"? Display.Hidden: display.visible;

    getField("Date").display = event.target.value = "Off"? Display.Hidden: display.visible;

    Change all instances of = 'Off' to ! 'Off' = .

  • Perform actions on read only text fields

    I work on an inventory for a renovation of the building to come and hope to make an "interactive stop' of sorts on the PDF of the floorplan showing the hardware inventory for the rooms.

    My goal is that each room on the floor plan to have an invisible field that covers (I am currently using text fields), so that when the user's mouse is in this room on the floor plan, a 'Mouse enter' action is executed to display a second text box VISIBLE read-only containing notes and inventory relevant in this specific room. Conversely, when the user's mouse leaves this place on the floor plan, a 'Mouse exit' action is executed to hide this second text box.

    I have this feature works for the most part, with the exception that the text fields that I use to describe the rooms are still visible in an opaque blue tint when the PDF file is displayed. I would have preferred them to be completely invisible and cannot be changed by users.

    If I change the property of form field to 'Hidden', or tick the box 'Read only' property, entry and exit mouse mouse actions will not run.

    Anyone have any suggestions on the best way to achieve this?

    Thanks in advance!

    Instead of a text field, use a button for mouse input/output actions. They can be parameters to have no visible border or background, so will be invisible.

Maybe you are looking for

  • Transfer from old PC to new PC

    I am transfer from old PC to new PC's iTunes library.  Transfer songs purchased, but transferred without CD tracks.  I tried export library old PC to the drive, the thumb then import library from USB key, without success.

  • MacBook Pro in 2012... issue update?

    Hello So I just put a 480 GB SSD in my MacBook Pro mid-2012, and I've also upgraded the RAM 16 GB a few weeks ago. Everyone keeps telling me that it is not possible to upgrade the processor. Is this correct? Is it because the CPU is soldered to the m

  • HP Pavilion Elite m9600t memories configulation

    A few years ago, I bought this HP Pavilion Elite m9600t. It came with Windows vista x 64 with 6 GB of RAM (2 GB X 3). Currently this system is running Windows 7 Ultimate x 64. Now, I would like to add a few memories more. So, I check on HP web page t

  • Passing variables to TestStand

    I appologise for another probably silly question: I would like to use a variable / parameter (which ever you choose to call) within my method. It seems that all models are configured to output only. for example: -. public void DummyFunctionName (out

  • error code 643 by windows update whats wrong what to do?

    See title