Drop-down field - when some entries are selected are unavailable another field for data entry

Hi all

A sorry again, I am very new to forms and have another question. I have a drop down list which list by selecting certain values I need an another field will not be available if the user can enter data.

Hopefully this example is logical:

Drop-down list Champ %
Outdoor

Not allowed to enter data

Previous

Not allowed to enter data

Interior

Not allowed to enter data

Cotton

Allowed to enter data

Wool

Allowed to enter data

If someone could give me some examples that would be a great help.

Thank you very much

Adam Sadler

Here is a script that you can use for the validation script custom from the drop-down list. It resets the value of the text box, whenever a change is made to the drop-down list. You can get rid of the line doing it, if you do not want to. Change "text1" in the code to match the name of a text field that you are using.

Validate a custom for picklist script

(function () {}

Get the selected value

v var = event.value;

Set up an object to associate status items text box read-only

var f_state = {}

'Outside': true,

'Back': true,

'Interiors': true,

'Cotton': false,

'Wool': false

};

Get a reference to the text field

var f = getField ("text1");

Clear the text field

f.Value = "";

Set the State of read-only text box based on what is selected

If (v f_state) {}

f.ReadOnly = f_state [v];

}

})();

Tags: Acrobat

Similar Questions

  • Do not select the in drop-down fields, JS pls duplicate entries. ?

    Hello

    I have 3 fall to the low fields in my_sub_form, say, my_country_1, my_country_2 and my_country_3. All the field list drop-down boxes are filled with 10 names of countries, say, United States, Canada, Spain, Germany, France...

    Say user selected U.S. my_country_1 drop down field, new user TRYING to select same entry of the United States in the field of the my_country_2 = > here at this point, as soon as the user has selected United States in my_country_2 droppped to the bottom of the Inbox list = > immediately, I need to start the warning message to the user and make the my_country_2 as "" VACUUM.

    Basically, my form does not allow the user to select the duplicate in these 3 fields drop-down entries, all 3 should be SEPARATE.

    If I write JS in the event of my_sub_form, his works well, but not easy to use, this kind of delay.

    So we want to have an INSTANT user alert as SOON AS the user selects an entry duplicated in any field drop-down list

    I tried to put some JS in case of CHANGE of my_country_1 and my_country_2, but does not

    Pls provide me with a few JS and the name of the event, the name of the object

    Thank you

    you could put in the output of the list of my_country_1 event:

    If (this.rawValue == my_country_2.rawValue | this.rawValue == my_country_3.rawValue)

    {

    xfa.host.messageBox ("you can't choose the same country");

    this.rawValue = «»

    }

    then put the same thing in the other menus but change the names.

  • Show alert window when the selection is made in menu drop-down (or when the text field is filled)

    I'm a JavaScript novice writer and need help a warning window that meets the programming user selection form a menu drop-down.

    If the user selects any option except the default choice (which is just an empty space), I want an alert is displayed.  If the user is moving through this area without changing the default value, nothing should happen.

    I have a script attached to the "blur" event for the dropdown menu, but it appears each time you tab in this area, of course.  I don't know how to tell him to display the alert if and only if the user has changed the selection.

    Similarly, I have another field which is a simple text field.  If the user types anything in this area, I would like another alert window pops up.  The thing from the drop-down list seems a little more difficult, so if anyone can help me get that squared away, I can probably understand how to program the alert text field.

    In fact, it's the same code for both types of fields:

    If (event.target.value! = event.target.defaultValue) app.alert ("your message");

  • Count the number of drop-down list items based on the selection

    You will need to get an "account" (in the fields of totals at the bottom) of each of the values/items selected in the drop-down "ddClassification". My drop-down fields are labeled ' ddClassification.0, ddClassification.1... etc.

    Should a loop be involved? Been looking around for the answers but can't really find anything. The values in the drop-down list 'ddClassification' are 'Choose', 'Major', 'Minor', 'OBS', 'OFI '. If I could just get help on one of the "total" fields (for example perhaps the total large field) first then I could go from there. All THE HELP is APPRECIATED! Thank you!


    I have attached a screenshot and here is the link for the form: Dropbox - ASSESSMENT_NOTES.pdf
    Screenshot.png

    Yes, this requires a loop. Here's the Basic code structure, which you can use for the total key, for example:

    var total = 0;
    for (var i=0; i<=4; i++) {
        if (this.getField("ddClassification."+i).value==4) {
            total++;
        }
    }
    event.value = total;
    

    Place this code in the script to custom calculation of 'txtMajor '.

    Edit: Name of the field max adjusted from 5 to 4...

    Edit #2: Also adjusted the value of "Major" in the value of exports 4...

  • How can I open Web sites that I put in the drop-down menu when I click on the blue arrow to the menu drop-down

    I have windows XP. I use msn.com for my homepage. I entered the sites I want to go to every day. These sites are in the drop-down menu when I click on the blue arrow down. When I click on any one of these sites, they are not open. What can I do to fix this.

    Your user agent shows you are running Firefox in compatibility mode for Windows 98 (NT 4.10).

    • User Agent: Mozilla/5.0 (Windows NT 4.10; rv:37.0) Gecko/20100101 Firefox/37.0

    Make sure that you are not Firefox running in compatibility mode.
    You can open the properties of the desktop Firefox shortcut via the context menu and check under the tab "compatibility".
    Make sure that all items are disabled in the tab "Compatibility" in the Properties window.

  • border drop-down color change on entry/exit event

    Hello

    I'm drop-down list to change the border color and thickness on entry/exit events. I found this script written by Niall O'Donovan, who works for text and numeric fields, but not for a list drop-down and chackbox.

    Could someone please adjust this script for a drop down list?

    Come in:

    VNAME var = this.name.toString ();

    xfa.resolveNode (VNAME + ".") ui.textEdit.border.edge") .stroke ="solid";

    for (var i = 0; i < 4; i ++) {}

    this.ui.oneOfChild.border.getElement("edge",i).color.value = "255,153,0"; orange tint

    xfa.resolveNode(vName_+_".ui.textEdit.border").getElement ("edge", I) .thickness = "0,0200" in

    }

    output:

    VNAME var = this.name.toString ();

    for (var i = 0; i < 4; i ++) {}

    xfa.resolveNode(vName_+_".ui.textEdit.border").getElement ("edge", I) .thickness = "0,0069" in

    }

    xfa.resolveNode (VNAME + ".") ui.textEdit.border.edge") .stroke is"lowered";.

    Thank you

    Marko

    Hi Marion

    The script you should to a TextField (textEdit, for example).

    In the examples I give, there is a list of properties .ui that you can use for different objects:

    For example:

    Date field =      #dateTimeEdit
    Dropdown =      #choiceList
    Checkbox =      #checkButton
    Text field =      #textEdit
    Numeric field =     #numericEdit
    

    If you have a look at the examples on page 2 of this example: http://assure.ly/gzOH0E.

    So for the drop-down list to replace "#textEdit" by "#choiceList" AND use "#checkBox" for the checkbox.

    Hope that helps,

    Niall

  • How to disable the address drop-down list when you write a new?

    I don't want my previous addresses drop-down list when I start to write a new one.

    • Firefox (Tools) > Options > privacy > address bar: when you use the location bar, suggest: nothing
  • How to get the new activation key when some numbers are taken away and you have received?

    How to get the new activation key when some numbers are taken away and you have received?

    Have a laptop with windows 7 from Dell. Need to re install W7. And I have some numbers are taken as a result of its use.
    How can I get a new code activation or my complete activation code?
    Best regards, W7 user

    How to get the new activation key when some numbers are taken away and you have received?


    Have a laptop with windows 7 from Dell. Need to re install W7. And I have some numbers are taken as a result of its use.
    How can I get a new code activation or my complete activation code?

    Dell provided you with restore/recovery media and/or a way to restore the machine 'default' as a key sequence?  If so - you won't need the number--unless they just sent a DVD of Windows 7 nu - and they are usually not unless you ask.

    They have probably installed using their key, which means that even with a utility like Belarc Advisor or ProduKey - you will not get the product key that matches the one on the sticker.

    Some may have you take several different digital pictures of the sticker from different angles and see if you can decipher the missing characters like that (you'd be surprised to see how that works).

  • When I go to "Selection tool" and "Type tool" for example. I can't go back in the selection tool again. It is locked.

    When I go to "Selection tool" and "Type tool" for example. I can't go back in the selection tool again. It is locked.

    I did a fresh install, and the programme of work of the normally.

  • Hide the drop-down list when you print only when "PLEASE SELECT" is selected (unused field).

    Our form has several drop-down lists that by default the option "Choose", and not all of them are used whenever the form is used.  When we print a copy of each document, we would like the (unused) field "Choose" to disappear when printing - to make a copy of paper filter.  Is there a script for this?  I tried to use only the general framework ' Visible but does not print ", but of course, the field prints any - we need to print only when there was one another option as the default"Select"is selected.  Thanks in advance for your help.

    Coleen

    You can use a custom validation script, something like:

    Event.Target.Display = event.value = "choose"? display.noPrint: display.visible;

    To put this into effect, you will need to make a different choice and place it back to "choose." Another option would be to place as a custom Format script.

  • How to make the fields from the drop-down list required to make a selection before you save a PDF file

    I have a PDF form where I entered a JAVA script in some areas by using the option ON BLUR under 'Actions' and it works very well to prevent users to go to another site if they leave the field with the empty JAVA Script in place.

    My question is that I have other form fields that have a drop down menu where they can choose several options. I would also like to make these fields to where they can't move forward on the form unless they choose an option in the list. However, because with the option in the list "choose a ' is a default option entered into the field (field is not empty), script JAVA of BLUR ON option I used in my empty fields does not work to block the user to move beyond the matter without selecting an option. They are able to save the form with all the drop down menus staying to 'pick '.

    I made the field "Required fields" then they are highlighted with the red area around, but is there another tool to force them to choose an option for each in the drop down menus before you save the form, instead of being able to save with leaving the 'choose One' in the field by default?

    The best way to do this without knowing the default value of the field is to compare the value of the field to the default value of the field... You must make sure that your default value is not part of the possible acceptable answer. It works with most of the field types that a user can fill.

    If (event.value! = event.defaultValue) {}

    do something;

    App.Alert ("required field not completed. \nField name: "+ event.target.name, 1, 0);

    }

  • How to trigger a refresh of a drop-down list when the selection is changed

    Hello

    This is a general question of ExtendScript, but since I work with FM, I'll ask here first. I have a bit of a paradox here and I'm not sure of the best way to manage it.

    I have a dialog box with a drop-down list, where I want to refresh some controls when the user changes the selection in the list (dropdownList.onChange). This includes them refresh the content of the list itself. However, the problem is, whenever I try to update the content of the list, onChange triggers again. So, if I put the call to update box in the onChange handler, it will result an infinite loop, because my upgrade function fires onChange when it refreshes the list.

    Does anyone know a better methodology, where I can safely triggers a refresh of a drop-down list in the list's onChange event handler? I really wish that onChange was reserved for an action of the user only, or at least there is a property for this purpose.

    Russ

    Hi Fabio,.

    You can't "Refresh" a menu drop-down.

    But you can rebuild.

    You must do it "manually".

    As I do:

    1. I have a picture I want to show in the dropdownlist control.

    2. I have delete all children: myList.removeAll ();

    3 I have rebuild the list via mylist.add ("item", "myArray [index] in a for - loop.

    But if you know the exact position of the elements to remove or add, you can do so via splice()

  • I use a horizontal menu of the widgets library. All right, except that I would have any of the drop-down list list stay open after selecting the top item... and remain open after the selection of a menu under item - so that the viewer knows where they are

    I use a horizontal menu of the widgets library. All right, except that I wish I had the all menu drop-down list stay open when you have selected the top element. And when you have selected a menu SUP item - so that the viewer knows where they are in the navigation. Who is? Thank you!

    Hello

    There is no native function to Muse to achieve this goal. However, if you host your site on Business Catalyst, you can take advantage of the functionality of breadcrumbs. He won't let the open drop-down list stay, but it will show customers on what page they are and that he can see that they have followed to reach the page. For more information, please visit the following link http://helpx.adobe.com/business-catalyst/partner/add-breadcrumbs.html

    Kind regards

    Aish

  • Make a drop down field selectable, but password protect text

    Hi, we have created a form with several drop-down menus. One of the drop-down menus contains the prices. We have been asked to make this drop switchable - but lock the text, so only the password holders can change the price.

    Is this possible, and if so, how are you?

    Thank you in advance!

    No, it isn't. With the help of player you cannot select an item in a drop-down list,

    change (except if you have enabled the option in the properties of the field that)

    allows the user to enter custom values).

  • Drop-down list confirm that there are no empty selection - using Acrobat Pro

    How to validate a drop-down list to make sure that a user selected something in the list? I currently have several options in the list, including a ' ' blank space. If this space of blanks is selected or they tab right on the body (if you select nothing) I need an error message occurs. Thank you.

    Figured it out:

    onBlur for the domain, I entered this code:

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

    App.Alert ("required field: Please enter a valid choice, the field cannot be empty." "");

    }

Maybe you are looking for