Change a text based read-only to writable field on Drop Down selection

I have a drop down list named "Terms of payment", there are three selections "Net 30", "45" Net, and 'Other' if the user selects another there is a text box that is read only format named "OPTDescription" which should be changed to read only write. "  In this text box, the user will describe other terms of payment.

I tried to reuse the code I received previously for radio buttons, but it doesn't seem to work.  Here is my code:

CHANGE A FIELD TO ONLY WRITABLE BASED ON MENU DROP DOWN

var f = this.getField ("OPTDescription");

{if(Event.Target.Value=="Other")}
f.ReadOnly = false;
f.fillColor = color.white;
} else {}
f.ReadOnly = true;
f.fillColor = color.gray;
}

Make sure you only check the option to validate the value of the field drop-down immediately (under its properties - Options), and then use the above code as its custom validation script. Just change event.target.value to event.value .

Tags: Acrobat

Similar Questions

  • Cannot change the properties of 'read only' files in xp

    Recently, I was not able to change the properties of 'read only' to my files. I click on 'Properties', uncheck the 'read only', press on apply, click OK. When I re - check the records they come up to 'read only' again. I can't find a way around it. It has stopped me to back up files, since I get the message that the files are 'read only' and cannot be changed.
    All solutions?
    Thank you

    The read-only attribute has never been applicable to files under XP. You can try to take ownership of files/folders instead.

    Appropriating a file or a folder under Windows XP [Q308421] - http://support.microsoft.com/?kbid=308421

    How can I get the Security tab in the folder properties? - http://www.dougknox.com/xp/tips/xp_security_tab.htm MS - MVP - Elephant Boy computers - don't panic!

  • How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    Hi all

    How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    There is also a checkbox on the dialog box 'Sign' to lock document after signing.

  • How can I change the automatic country setting that is displayed in the payment gateway billing address? There is only one country in the drop-down list, not my current country

    How can I change the automatic country setting that is displayed in the payment gateway billing address? There is only one country in the drop-down list, not my current country

    A few changes/Verify account https://forums.adobe.com/thread/1465499 links that can help

    -html http://helpx.adobe.com/x-productkb/policy-pricing/change-country-associated-with-adobe-id.

  • Why not make a text box read only based on drop-down of work?

    Hello experts.

    I received help on this a few hours ago, and it has worked very well so I closed the discussion and form.  However, now it no longer works and I don't know what I did.

    I have a form with a dropdown list and two text boxes.  The first text box is populated according to the value selected in the drop-down list, I used a simple table of the to do and it works as expected.  I had to bring textbox2 read only based on some selections in the drop-down field.  It worked very well at the beginning, but now it no longer works.  I did not any changes to the form except that I closed and since.

    I try to get the following to work:

    If (this.rawValue is "Junk" again)

    {textbox2.access = "readOnly" ;}

    If (this.rawValue is "More Junk")

    {textbox2.access = "readOnly" ;}

    I put this in the change event using javascript.  I use ARE 8.2 on Windows Vista 32 bit.

    Any help would be greatly appreciated.

    Thank you

    Jerald

    In the case of change you can't get the rawValue... So, use xfa.event.newText to get the modified text...

    Also, you have a space at the end of the value while comparing. In the code below I removed it.

    If (xfa.event.newText is "Junk Again")

    {textbox2.access = "readOnly" ;}

    If (xfa.event.newText == more "junk")

    {textbox2.access = "readOnly" ;}

    Thank you

    Srini

  • How to disable the USB port and change DVD drive to read-only?

    I have upgraded my Vista Home Premium from window to window 7 Ultimatum. I tried to disable the USB port and and change the configuration of DVD room to read only via the bios, but I wasn't able to do. The bios always the same, whether it was when I had vista.

    I wonder if the operating system upgrade from Vista home premium to Windows 7 ultimate trigger necessarily upgrading the bios in order to take full advantage of the Windows 7?

    Thank you

    * original title - upgrade from Vista home premium to Windows 7 ultimate necessarily triggers upgrading the bios in order to take full advantage of window 7? *

    rThen your question isn't specific to Windows 7, you must consult the manufacturer. You should be able to disable the USB via the BIOS ports. Also, why do you want to set the optical drive as read only? If it is shared? If so, the advanced sharing disk properties, from there, you can set permissions on the drive. If you releasing It Easy: with Windows | ActiveWin | Laptops | Microsoft MVP

  • Impossible to change an attribute of read-only for the My Documents folder in Windows 8

    Problem:

    Everything I put in My Documents directory is converted into read-only, so all my files in this folder (especially my PDFs) cannot be opened OR downloaded/sent online. I tried to use cmd and Type attrib - r "c:\users\myaccountfoldername\documents" but nothing works, document folder still has that little padlock on its icon. I also gave everyone full access to this folder, but whatever I do, I can't change the property "read only". Even if I uncheck that manually in the properties, it continues to go back.

    I looked for a solution now and I still have solved it. I ignore it if I could, but I put a lot of important and frequently accessed files in my library of Documents, so I really need to get this figured out soon.
    I just bought this laptop about a week ago, it came with Windows 8. I'm not sure but I think that this problem happened to me when I joined the homegroup on my local network and began to share files so that I can transfer my old files from my old laptop.
    With this in mind, I tried also to leave the homegroup and restart. The Documents folder was read-only a minute or two after I restarted, but then it became like this again after some time.
    I know that it was designed for the safety of my files and everything, but what should I do with my 'secure' files, if I can't even open a simple PDF file?
    I am the administrator and the user account only on this laptop

    Platform:
    64-bit Windows 8
    Path in question:
    C:\Users\USERNAME\Documents

    I finally understood what was causing the problem! Apparently, he was in the Service of protection against theft by MacAfee (that I installed immediately after the purchase of my new laptop) encrypt all the files in the Documents folder and all the office files that I have! Which explains why no matter how many times I try to seize or delete and redo the folder my documents, it simply would not work. I finally uninstalled the hassle of a service and I can now access my files again :)

  • Change the attribute to read-only by using ClientListener?

    Hello friends of the forum...

    I created a form with two INPUTTEXT and put them with read-ONLY using an EL made reference to a BEAN called GENERAL Manager

    < af:panelFormLayout binding = "#{backingBeanScope.backing_Layout2.panelFormLayout1}" id = "panelFormLayout1" > "
    < af:inputText value = "#{bindings." Modulo.inputValue}"binding =" #{backingBeanScope.backing_Layout2.inputText1} "id ="inputText1"* readOnly =" #{General.BLock} "* / >"
    < af:inputText value = "#{bindings." Proceso.inputValue}"binding =" #{backingBeanScope.backing_Layout2.inputText2} "id ="inputText2"* readOnly =" #{General.BLock} "* / >"
    * < af:clientListener type = "dblClick" method = "activate the" / > *.
    * < af:serverListener type = "activate the" method="#{backingBeanScope.backing_Layout2.activarBloque}"/ > *.
    < / af:panelFormLayout >


    ClientListener calling Javascript Fucntion:

    function Activar (event) {}
    AdfCustomEvent.queue (event.getSource (), "Activar", {operation: "Create"}, false);
    }


    ServerListener call the method to change the attribute Block of GENERAL bean and also try to update panelFormLayout...

    {} public void activarBloque (ClientEvent clientEvent)
    * General.Block = false; *
    General.Operacion = clientEvent.getParameters ().get("operacion").toString ();
    * AdfFacesContext.getCurrentInstance () .addPartialTarget (this.getPanelFormLayout1 ()); *
    }

    (the block is static attribute)

    After I do dbClick I see general.block change its value to false but inputText don't update!...


    So, how can I force it to refresh the components when actionListener is trigger?

    Hello

    I think that in this case, you must call

    AdfPage.PAGE.addPartialTargets ()

    in JavaScript

    Frank

  • Disable or enable a text based on the recorded person field.

    I have a requirement in a form based on an Oracle table. If my manager opens the top form, he could enter a value in a text box. But if employees open the same form that they could see the text field but cannot change the value in the text (i.e., its registered status and disable) box.

    Please suggest me what I do? Enjoy it!

    Thank you
    NS

    How you are authenticating users? You can install plans permission to hide and show elements, or you can set read-only properties.

  • List drop-down selection trigger change in the text field

    I'm hit a roadblock here. I'm on Adobe Acrobat XI and here's the scenario: I have a list box and a text box.

    Drop-down menu field has 3 caps (A, B, C).

    If A is selected, the text box = 15 default, but has the ability to change in the text box.

    If B or C is selected, the text box = 0 or "by default, but it has the ability to change in the text box.

    If I use an if/then with a .value, I'll be able to get the numbers to work, but do not have the ability to edit and keep them there. If I enter another number in another area, the JavaScript code will run and change the text box to 0 or 15.

    Any help would be greatly appreciated.

    Thank you

    Instead to use script logic for the text field, use the drop-down validation script. In this way, that it only will be triggered when you change the value in the drop-down list field, not when you change any field in the file (as the calculation script).

  • Make the form read-only if a field is filled

    Is there a way to do an entire form read-only if a certain text field is filled?  I know that adding a digital signature to a form field, increases the size of the screen, so I prefer not to add a digital signature field in my form.  However, I would like the feature that says after the form is signed, it is read-only.  I have added a text box to the form and tried to add a script that read: if (this.rawValue! = "") (this.access = "readOnly"), but it did not work.  Is there a way I can accomplish this without adding a signature to the form field?

    Hello

    It depends on where you have placed the script, probably the best place is the exit event.

    if (this.rawValue != null || this.rawValue != "")
    {
         this.access = "readOnly";
    }
    else
    {
         this.access = "open";
    }
    

    It blocks only the field that the script is inside.

    You should check the example of Paul LockAllFields, which contains a function in a script object. Whereas Paul calls it a click to a button event, you could call it the output of the particular text field event.

    Re: Save form non-fillable PDF

    Hope that helps,

    Niall

    Ensure the dynamics

  • How do I automatically populate the text field box based on data generated automatically in the drop-down list?

    I created a drop down list which includes various regions.  When a region is selected it auto-renseigne another drop-down list with places.  I would like to automatically fill a text field with predetermined phone numbers when you have selected a location in the drop-down list of "places".  I want to integrate the phone numbers in the code, since the form will not access a database.  Any help would be greatly appreciated.  Thank you, Ed.

    Hello

    Here is the link to your form. https://Acrobat.com/#d=BaCL7BKKdAcgV3JIk61nZg

    You have the updated field matches in the event changes from the 2nd menu drop-down.

    While referencing you use .page1 while your page is Page1.

    Thank you.

    Sidonie.

  • Make a field of text/hide according to the results of a drop-down list box

    Hello

    I wonder if someone could help me with this. I want to show/hide some text boxes in my form according to the choice made by the person filling in. For example, there is a dropdown list containing a selection of numbers 1-4. If 1 was selected, the text boxes below 1 would be visible and obligatory, if the 2 have been chosen, 2 text boxes below would be visible and required etc...

    I'm new to FormCalc (only started using it this morning), so simple a possible explanation would be fantastic.

    Thanks for reading!

    Of course, you can have javascript and formcalc in the form. Not only the two in the same field, same event; D

    Okey, let's try some things:

    (1) check if the "binding" from the drop-down list is the same as the values that you choose. In the script you are referring to the bound values.

    (2) other names for the Textfields would be better, because it is more difficult to refer to "Textfield1 [1]" then to for example: 'New '. I was just to lazy to give them names. (If it's on another page or subform, you refer to the fields correctly: as MyForm.FirstSubform.FirstTextfield... this name lies in the specific script field.)

    (3) check your script once more... want to make invisible mandatory fields?

    (4) check if your form is dynamic. (If it isn't you will not see the changes...)

    You should probably do it in small steps, such as:

    (1) first of all, you refer to areas such as:

    This.rawValue = Firstfield.rawValue;

    If the changed value fields got you its name and to be sure that the event you put is the right one.

    (2) try the different parts of the script and look at how it works. Problems can be more easily found and then

  • linking two fields and fill in the two field based on the list drop-down selection box 1

    I work for a small social service agency VERY small non-profit and I try to get our paperwork until the twentieth century. I hope someone here can help me. I have adobe acrobat, but not of other adobe products. I converted our word document that we use for client notes in fillable pdf format and so far everyone is excited to try it. I have a huge problem that I can't understand. I have a customer named created drop-down list box that contains a list of 300 customers. Box 2 is named customer ID and will contain a unique identification code assigned to each customer.

    For example:

    CUSTOMER ID customer JANE DOE 12345678

    So here is my question how can I ensure that when Unetelle is selected 12345678 is already filled in the second field?

    I fill the drop-down list with the names of customer and then enter the customer ID as the value of exports. Note You must have a unique name for each client.

    If your customer ID starts at zero, then you must use a custom JavaScript, so you can keep the zero non significant.

    For the customer ID field, you can use the following custom JavaScript code:

    Event.Value = this.getField("DropBoxFieldName').valueAsString;

    You will need to change DropBoxFieldName name of the drop-down list.

    You will need a mechanism for updating the new customer form and IDs names.

  • 2 different text fields filled according to Drop down selection list

    Hello

    I am creating a form where a phone number is in a text box, an email address is filled and in another area of text, from a selection in a drop-down list. I use CS3.

    Any help would be appreciated.

    in the event from the drop-down list output put something like (in formcalc):

    If ($.rawValue == 1) then

    Phone number = '12345566. '

    email = "[email protected]".

    ElseIf ($.rawValue == 2) then

    Phone number = "67890".

    email = "[email protected]".

    endif

    (Make sure you have the ' specify values of element checked for the drop-down list object > link ")

Maybe you are looking for