Mandatory text field / drop-down list under option RadioButton

Hello

I am working on a form with a set of option buttons: individual or joint.

A drop-down list will become visible if the user clicks on the joint. How can I set this drop-down list to be mandatory when the 'joint' is clicked?

And also - what would be the script as if I want to put a text field to become mandatory according to radio button clicked?

Thanks in advance!

Hello

You can write the following script in the button click event

to make the object TextField or DropDownList required and visible when clicking on the radio button and

text field / dropdown list not to be mandatory when it is hidden.

If (this.rawValue == 1)
{
TextField1.presence = "visible";
DropDownList1.presence = "visible";
TextField1.mandatory = "error";
DropDownList1.mandatory = 'error ';
}
on the other
{
TextField1.rawValue = null;
DropDownList1.rawValue = null;
TextField1.presence = "invisible";
DropDownList1.presence = "invisible";
TextField1.mandatory = "disabled";
DropDownList1.mandatory = "disabled";
}

Thank you

Stéphane.

Tags: Adobe LiveCycle

Similar Questions

  • How to enable/disable readonly in text fields, drop-down list field?

    For example, I have a dropdown field named "DropdownField" and a field of text called 'TextField '.

    Within 'DropdownField', I have four choices: Option 1, Option 2, another, combination. When the user first sees the "DropdownField", they see 'Select Option.' When the "DropdownField' select Option, Option 1 or Option 2 selected, I want to 'TextField' to be a read only field. However, what other or combination are selected, I want them to be able to grasp things in the 'TextField', which makes is not readonly. Also, tell someone selects 'Other', but realizes that they have made a mistake, I want them to be able to select Option 1, and have the return of 'TextField' read-only.

    Currently I have the JavaScript code as a MouseUp on "DropdownField: action

    var getField.DropdownField = drop;

    var getField.TextField = text;

    If (drop.value! = 'Other' | drop.value! = 'Combination')

    {text.readonly = false ;}

    on the other

    If(drop.value = 'Other' | drop.value = 'Mix')

    {text.readonly = true ;}

    However, the JavaScript code above doesn't seem to work. Please let me know what I'm doing wrong!

    You must use the event to validate drop-down list and use a script like:

    var f = getField("TextField");
    
    if (event.value === "Other" || event.value === "Combination") {
      f.readonly = false;
    } else {
      f.readonly = true;
      f.value = f.defaultValue;
    }
    

    Also, set the option in the drop-down list "Value Commit selected immediately".

  • Auto complete text field drop-down list gets disoriented

    Hello

    I developed a page of connection with a field of user name and password, I made the username field to be 'Text with AutoComplete' and gave the sql code to fetch the result of falling down, while when I apply a style to overried the position of the region using the left and right drop-down list style attribute appers in the screen is not what I need. Can someone help me. I use Apex 4.2

    Thanks in advance

    Published by: eldho45 on December 10, 2012 20:42

    Joel_C wrote:

    fac586 wrote:

    eldho45 wrote:

    Thanks a lot for your concern

    My concern is that the security implications to use AutoComplete on a connection user name. This allows the infamous capture user names for each user on the system to work their way through the alphabet by KeyDown keypress without effort.

    Could be an internal site (i.e. not exposed on the web).

    Makes no difference. Internal hacking/fraud is still hacking/fraud. And it is much more likely to succeed. The negative person on the inside knows the details of partners/children/animals-domestic/cars their colleagues who will be in their passwords.

    In addition, I'm sure it'll be fine because everybody uses passwords to secure great Don't they?

    ...
    pa55word
    rangers1874
    simplythebest
    cfc1888
    trustnoone
    ...
    

    UM *.

    sevco2012?

  • send several ID field of unique text through drop-down lists

    Hello

    It drives me crazy.

    I have x 3 drop-down menus 'Day' "Month" "Year" and I want to send these parts to a single rating marked with the id 'date' to compensate for a syntax correct date without refreshing or send the form. I use getelementbyid to send the onchange = "getAmount (this.id) request for drop-down list", but it sends only an id and when the next drop-down list is selected it replaces the previous selection, rather than putting all of this together in correct date format. "

    Here is the code I use, but it is clearly wrong: -.

    Each drop-down list: -.

    getAmount (this.id)

    and then the following javascript code to send the ID

    < script type = "text/javascript" >

    function getAmount (optText)

    {

    var salt = document.getElementById (optText);

    document.getElementById("date","['EventDayID_<?php_echo_$cnt1;_?>','EventMonthID_<?php_echo_$cnt1;_?>','EventYearID_<?php_echo_$cnt1;_?>']").value = sel.getElementsByTagName ("option") [sel.selectedIndex] .innerHTML;

    }

    < /script >

    and the input field I want to enter the full date: -.

    < input type = "text" name = "" id = "date" / >

    Is anyine knows how to handle this?

    Thank you very much

    Glennyboy

    You only need one identifying any...

    Change your Mysql in bulk or add check boxes used or unused:

    SELECT * FROM table WHERE IS NULL or IS NOT NULL column

    You can extend your

    SELECT * FROM table WHERE column1 = something AND column2 IS NOT NULL

    or

    you check every box before printing it, if (cb1! = "" or cb1 == "") {echo/print/do something ;}

    Thank you

    J

  • How to define the format of a field drop-down list text align at the top of the field instead of the Center?

    I have a form with the fields of data entry simple Acrobat 11. I have, for the first time inserted drop-down lists and most of them is single-line fields. However, there are a few examples where my field must be larger to mask unwanted background. (The field will define the colur to white background are data entry, but I did not write the script for this.) When a selection is made, it appears centered in the field and I need to be aligned to the top.

    I guess I can put a script on the Format tab, in the custom format script, but I don't know enough about Javascript to run on the syntax. I guess it would be a simple line or two of code. Can anyone help?

    You have no control over this. They are always vertically centered. You can use a separate field in the drop down menu, however, and control its background. I suggest to use a read-only button.

  • Network option just is not in the drop-down list under the definition of the property

    I have a vRA 7 installation and am trying to create a drop down menu option to choose VLAN while deploying VMS from the Blue Print.

    To do this, have created a property definitions as below.

    Capture.JPG

    Then I had created a group of properties like below

    PG.JPG

    Then to Blue Print Custom property and added the Group of properties and property custom added the VMNetwork

    When I return to the catalog and deploy a new virtual machine can't see any vlan in the dropdown option menu.  instead I see the preset in the menu drop-down

    pg3.JPG

    Why the drop-down list values Vlan do not come up instead of this the name value appears.

    If mistaken. any help appreciated

    Try like this:

    The property group is like the old building profile, a way to group several properties. You must specifically that he would do that.

    Grant

  • Not by selecting for viewing, but don't drop-down list box option

    Is it possible to have an option in a drop-down list box that is the first thing that people see, but not a selection? The field is mandatory, but I don't want the first option to be shown. For example:

    < select a >

    option 1

    option 2

    option 3

    Thanks in advance

    Nope.

  • Fill in textedit with selection field drop-down list

    Hello, everyone!

    Thank you much for the help that you give me for a long time.

    I have never seek and find great solutions.

    But this time, I have found nothing.

    I need to fill a field of textedit from a selection in a drop-down list.

    Is there a way to do this?

    My fragment:

    var myP0a = myGtop.add("panel", undefined, "JOURNAL");
    myP0a.margins = [10,15,10,10];
    var myTEMPLATE = myP0a.add("dropdownlist", ["","",200,25], ["", "Journal 01", "Journal 02", "Journal 03", "Journal 04", "Journal 05", "Journal 06"]);
    myTEMPLATE.selection = 0;
    
    var myGdoi = myG1.add("group");
    myGdoi.add("statictext", undefined, "DOI:");
    myGdoi.orientation = "row";
    var myDOI = myGdoi.add("edittext", undefined, "000");
    myDOI.characters = 34;
    

    Based on the selection of myTEMPLATE, I want to fill in the myDOI field.

    Is this possible?

    Thanks in advance and sorry if this question is already answered in another topic.

    The selection of a drop-down list is a ListItem object (or null), therefore, you just collect the selection.text from the drop-down list in the onChange of the drop-down list manager:

    myTEMPLATE.onChange = function(){
        if (this.selection===null || this.selection.text.length===0){
            myDOI.text = "000";
            }
        else{
            myDOI.text = this.selection.text;
            };
        // and maybe more stuff here
        };
    

    or equivalently, in a shorter form:

    myTEMPLATE.onChange = function(){
         myDOI.text = (this.selection && this.selection.text) || "000";
        };
    

    Xavier

  • Data from the field drop-down list does not clear when the reset button is activated

    Acrobat Pro XI

    All field boxes are checked in the tab properties of the button actions... but when I click on the reset button of the form I created only the data in clear text fields, not any of the data that has been selected in a drop-down list.  What I am doing wrong?

    The 'rest shape' command returns the fields to their default values. If this

    value is not empty, that's what he'll be back.

  • Connecting 2 fields drop-down list and have some appear field

    I've read about the binding of the two drop-down lists when you select something in the first box and then it adjusts the options in the second drop-down list box.  I love those who can use in the future.  I have a question a little.

    Can I have two lists that both selections control what fields appear below drop-down list?  For the examples list 1 to A, B and C list 2 has red, Orange and yellow.  I'll choose different combinations of the two and have different things to be displayed.  At Red and has fields 1, 2 and 3 show.  B and yellow display 1 and 3 and so on.

    Is this even possible or do I need to create different combinations all in one field and script the different responses that, I think I know how to do?

    Thank you!

    Hello

    The problem is that you are hiding the subform, BUT you try to assign to the presence of individual boxes in the subform visible. It won't work, because the subform itself is set to hidden.

    Look at the boxes to check and see if you can group them in series that are always hidden or visible. Then script against subforms and NOT the boxes. If you can not group the boxes then you will just have to refer to them individually.

    The textfield object was just a typo.

    Niall

  • Show / hide the text box drop-down list database

    Hi all

    First time post here - wahoo!  :-)  Brand new user of LiveCycle, and so far I'm loving - very cool app!  I am a bit puzzled, however, and hoping someone can help...

    I am using LiveCycle version 8.05 and try to build a form that has a drop-down list with departments in our Organization.  If the user selects the elements 1-5 on my list, I want two other fields at autopopulated (one for the Admin Assistant) and one for Dept Head.  If however the user selects 'Other', I want a text box (it will be hidden the rest of the time) where the person will be able to type in the Department they work for.  For now, I'm only interested on getting the box 'Other' to appear; I'll worry about the other stuff later.

    Elsewhere in my form, I have a functioning drop-down list that displays a text based on the selection field; However, for some reason this logic does not work with the situation described above.

    My code for the working text field is (in JavaScript)

    var
    
    (sNewSel)
    case "1": 
    switch
    {
    
         TextField6.rawValue = "My text is in here";
    break;
    case "2":
    
    
    
    = "My second text is in here ";
    
    
    break;
    "3":
    
    case 
    
    = "My third text is in here.";
    break;
    TextField6.rawValue
    
    default:
    }
    break;
    
    
    TextField6.rawValue 
    
    
    sNewSel = this.boundItem(xfa.event.newText);
    

    After many fruitless hours yesterday, I got only to the extent where the code below; This was more or less copied right out of a post here.  When I click on the drop-down list, select 'Other', the text field is displayed.  I tried the definition of the text field to the times 'Hidden' and 'Visible' through properties of the object, but no luck.  I tried to use IF statements, subforms and anything else I could think of but am getting nowhere.

    var nSubLength = Subform1.nodes.length;
    var 
    sSelectField 
    for
    
    {if
    {switch (xfa.event.newText) 
    (case "6":
    Subform1.nodes.item(nCount).presence
    break
    default:
    Subform1.nodes.item(nCount).presence
    break
    }
    }
    }
    ;
    = "invisible";;= "visible";((Subform1.nodes.item(nCount).className == 
    "field") &(Subform1.nodes.item(nCount).name== sSelectField)) 
    (var nCount = 0; 
    nCount < nSubLength; 
    nCount++) sSelectField = fieldList.rawValue;
    = sSelectField.replace(' ', '');

    Any ideas?  This is very new to me, but I am familiar with other programming languages, and something this simple should not be difficult which leads me to think I'm missing something.

    Thanks in advance

    Chris

    It was easier to create a sample for you... Please see the attachment.  I think that's what you want.

    The code is on the change event of the DDList

    Paul

  • Problem with drop-down list: under Windows, it works, on Mac is not

    Dear forum,

    I'm reworking the script MultiPageImporter2.5 by Scott Zanelli; going to add new features.

    So far, I added a drop-down list so that the user could choose which pages to put a pdf/indd file: odd/even/as well.

    my dialog box.jpg

    However, I encountered a strange problem: on Windows, it works as expected, but on Mac, nothing happens when I click on the shortcut menu. When I write a dialog box, I almost always use the automatic layout and never encountered such a problem before. But in this text the author uses a fixed position for the controls so I followed his style of coding:

    dLog.pageSideMode = dLog.pan4.add('dropdownlist', [10,110,180,40], ["Odd and Even Pages", "Only Odd Pages", "Only Even Pages"]);
    dLog.pageSideMode.selection = pageSideMode;
    

    The drop-down list is visible both on Windows and Mac, but on a Mac, it is not clickable. What I am doing wrong?

    Another question: in the script, the author has created three pop-up windows. In the code, each popup has a different height (the last element of the array 'limits') - 60, 88, 33. Does make sense to make them different if on the screen they are exactly the same (I mean height).

    Here's my version of the script.

    I think the easiest solution for me here is to rework the part fixed dialog for automatic layout.

    Thanks in advance.

    Kasyan

    Hello

    I don't think you're doing something wrong. If you change the vertical position of the popup to 90, the popup works if you click at the top, not if you click on the bottom.

    I think that you have found a bug in the previous DAY.

    P.

  • Hide the fields to add fields drop-down list in the advanced search mode.

    On the drop-down list to add fields in the field of the advanced search displayed by an af:query, is there a way to hide some of the attributes? He seems to show all the attributes of the default VO.

    The fields must be visible on other pages that use the VO. Table Panel and search queries will only to display a subset of the fields in the VO.

    Assigning to the attribute Display tip to hide will not do; at least this seems to be the case, because if I do that, then, the field is not available on the data control to be placed on other pages.

    I guess I could create a separate VO just to the search page; but I try to avoid this, it invites excessive maintenance as the system grows. If no indication on how to hide a field VO on add fields while leaving the field to be displayed on other pages would be appreciated.

    Versions: JDeveloper 11.1.1.4, ADF business 11.1.1.59.23 components.

    Thank you.

    I wrote a blog post on this subject and a sample of http://tompeez.wordpress.com/2012/01/06/jdev-afquery-hide-some-attributes-from-query-panel-but-show-them-in-the-result-table/ here

    Timo

  • Can I get the units in the field drop-down list?

    Hello

    I have a requirement that I have to fill out the field list drop-down (its caption is "Size unit") with 2 entries, they are ft2 and m2 (2 should be superscript), so I went to the range of the object and tried to copy/paste "2 and2m pi" but, 2 does not come as a great script!

    Pls I want to know how to do?

    Thank you

    When you press Alt-Gr and 2 you get ².

    So, you can directly enter the value as a square foot in the drop-down list.

  • I lost the most views drop-down list under the search bar, it used several times in the same session, and then he just disappeared.

    The drop-down list is / was my part used of any page, use it to access to everything I need. The only other thing I noticed changed it's new green bottom-tab at the top of each page: site Web Safe/number of trackers. I can't get rid of it. Avira virus control icon is on my desktop, but the icon also suddenly appeared on the right side of the search bar. I deleted it because I have it on the desktop. I have no why he appeared suddenly. It is my 3rd session today. I had not changed anything in previous sessions, so don't know why the drop down menu has disappeared.

    Any help appreciated.
    HK

    Hi, hopefully a screenshot can make things more clear - when you right click in the area of the red dot, then a popup menu will appear where you can re-enable the toolbar of bookmarks.

Maybe you are looking for

  • Cannot open a new tab in version 29

    Today, firefox closes and then apparently 'fixed' itself by updating without asking me because it looks completely different now that before it crashed. My biggest problem is that now that it's on version 29 I can't open a new tab. There is nothing i

  • Delete the foxfire

    How to remove history files

  • Iconia w3 user says howdy!

    Howdy! I have a hand Iconia w3-810. He has a lot of problems. I want to see if I can get into some kind of working order. How can I tell if it's a w-810 or w - 810 P? Admin account is locked. Battery will not hold a charge. Need to plug it into AC an

  • onTriggered retail Info (LISTVIEW)

    Hello Sorry to ask again I want to show the details of my promo It's my main QML NavigationPane { id : nav1 onPopTransitionEnded: page.destroy() Page { Container { Header{ title: "Promo" } ListView { id: listViewDemo dataModel: GroupDataModel { id :

  • BB 10 Dev Alpha Simulator 10.1 beta - screen resolution

    I couldn't get my Android app BAR file to install on the current version of the BB 10 Dev Alpha Simulator (10.0.10.261) so I tried to install the Beta 10.1 Simulator and my app installed first and short big.  The only problem is the screen seems to b