? Selections of list box to show/hide form fields

OK, so I want to use a list box to control the fields on form on my page are visible or hidden. I have no problem creating the list and adding items to the list, but were not able to understand what I need to connect each selection in the relevant script form field I want that he controls.

So, basically, I want to know what javascript is required in order to allow the end user to select one or more items of the listbox and have these fields become visible on the page. How can I do this?

Had a look at your code and you complete the loop before running your tests. If moldy either inside the loop for. statements I have modified your code (reformatted into it a bit so it is easier to read) and it included here.

Paul

Tags: Adobe LiveCycle

Similar Questions

  • Show/hide form fields

    Thanks in advance for your help. I work with a form that contains calculated fields. The calculated field is formatted for currency, so it contains the "$0.00" in the field automatically. Customers can also print the form and fill it out by hand, so the "$0.00" is a nuisance. Is it possible that I can hide the calculated field, unless the user has actually enters data fields to be calculated? Any advice would be appreciated. Thank you.

    The United States of the monetary symbol does not authorize the removal of the display of zero with a string NULL. So you can either set the fields do not use the currency symbol or dynamically change field with JavaScript format.

    For the validation script, use the following code:

    validation code custom;

    var cCurrency = ""; Disable the currency symbol;

    If (event.value! = 0) {}

    Event.Value = event.value;

    currency symbol set at USD

    cCurrency = ' $';

    } else {}

    value zero set value of field to null

    Event.Value = "";

    }

    Set the format with or without currency symbol field.

    AFNumber_Format (2, 0, 0, "", cCurrency, true);

    Code of end of validation custom;

    The number of decimal places is supposed to be 2.

    The form will need to be cleared or perform a calculation for calculated fields will be updated and the validation script will be executed before we see the results of this change.

  • The use of password for show/hide forms - anyway to keep the setting "does not print?

    I have a George_Johnson script that allows me to enter a password to show/hide the fields selected (keys actually).  It works perfectly, but when I enter the password and buttons appear again, setting general/Common Properties amounts to 'visible' instead of ' visible but does not print ', and the buttons appear when I print the document.  I thought I could change these lines and print buttons...

    case 'password': / / your password goes here

    getField("x").readonly = readonly;

    getField("x").display = readonly? Display.Hidden: display.visible

    App.Alert ("level 1 support is now" + readonly_desc + "d", 3);

    break;

    .. .to change the 3rd line to read as follows: getField("x").display = readonly? display.hidden: display.visible but does not print  (or _but_doesn't_print;)

    but then I started to make syntax errors in the 4th line.  I don't know about Java, but I thought I might get lucky.  I get hot?  What is the "3" that needs to change?  Or is that I started quite wrong?

    Thanks for reading,

    Zac

    You can't guess correctly that the value can be and expect it to work... You should consult the documentation.

    In this case, what you're looking for is "display.noPrint".

  • Show or hide form fields based on the selection of cfselect

    Hello

    I use ColdFusion 9 and

    I want to show/hide a form field type = checkbox if an assigned value is selected from a drop-down list, but it does not work.

    I use a javascript function.

    My question is: is there the best opportunities with ColdFusion for this or Javascript is the best solution?

    Here is my code:

    < script type = "text/javascript" >

    function show() {}

    Select var = document.getElementById('dropdownlist').selectedIndex;

    if(Select == 1) document.getElementById('area').style.display = 'block ';

    else document.getElementById('area').style.display = "none";

    }

    < /script >

    ....

    < cfquery name = "select_list" >

    Select * from table

    < / cfquery >

    < cfform name = 'form' >

    < name = 'dropdownlist' cfselect onChange = "show (); ">

    < option value = "0" > please select < / option >

    < cfloop query = "select_select_list" >

    < option value = "#select_select_list.id #" > #select_list.name # < / option >

    < / cfloop >

    < / cfselect >

    < div id = 'space' style = "display: none" >

    < cfloop query = "select_list" >

    < style tr = "display: none" >

    < td >

    < name cfinput = "SSG" type = "checkbox" value = "#select_list.id #" > #select_list.name #.

    < table >

    < /tr >

    < / cfloop >

    < / div >

    < / cfform >

    Thank you and best regards!

    Claudia

    Well, thank you for your response.

    I changed the javascript function and replaced the

    with thetag. Then it works.

    Here is a snippet of my code:

    Select * from table

  • With value of check box for show/hide radio buttons?

    I have created a pdf form. I have a checkbox and radio buttons several. I put it so radio buttons are hidden until the user clicks on the checkbox above him. I also put the box reset option on mouse-to top buttons. However, radio buttons are always selectable. I want to assure you that if one of the radio options is selected, the check box to be checked as well.

    Is there a bit of javascript, I could add to the check box to hide the option buttons if its value is not equal to yes (checked)?

    You can use code similar to

    If (event.target.value == 'Yes') {}
    selected - display radio buttons
    this.getField('Radio_Button1').display = display.visible; view the radio button
    } else {}
    Show box unchecked hide radio button and reset the field
    this.getField('Radio_Button1').display = display.hidden; Hide radio button
    this.resetForm (["Radio Button1'"]); Disable the option button
    }

    But YOY will have to change the field "Radio Button1" name match your fyouor domain name to the Group of radio buttons.

  • CANY bind you a drop-down list box to a send form button?

    This question relates to Adobe Acrobat 9 Standard.

    In my form, I have a combo box that lists 5 names and a button I want to use to send the form by e-mail.

    Based on the selection of combo box, I want the submit button (en) to submit the form directly to the email address that corresponds to the chosen denomination.

    Is there a way to do this?

    Any help will be greatly appreciated!

    For each element, you can specify a name and a value to export, for example:

    aIndustry [1] = ["Jen H", "[email protected]" ""];

    You can then use the value of export in your submission script, as follows:

    var recipientEmail = getField("BD_Executive").value;

    this.mailDoc (recipientEmail, true);

  • Select the list box file and read the data from file

    I can list the files in the folder in the listbox

    1. I want to just list file .txt files

    2. How can I read data from the selected file (.txt)?

    I think that's what you want, enter a model in your list of files vi (for example, *.txt) and then just use File.vi text of reading by using the selected item in the list box (double click on event or value change) and use the starting for the vi records list path.  I have included a crude extract for your pleasure.

  • Show or hide form fields based on Department

    Hello world

    I have a large form with many fields on. I have a requirement to show/hide some of these fields, based on the Department of the user code. So a user of a particular Department would see a set of fields over only those relevant to their Department - all non-relevant fields for this Department need to be obscured.

    My first thought was to define the conditional on each field and allows you to search if the field to be displayed by checking a department-field table in the SQL database. But it would mean a blow to the database for each field, that I need to check.

    Can anyone think of a more elegant (and efficient) solution for this? I use Apex 4.2.

    Hello

    Permission to create and assign to the patterns.

    Permission is normally performed only once per session.

    Kind regards

    Jari

  • Prevent the self-selection of list box data.

    I have a combo box that loads the data from a field in collection ArrayCollection which is populated by some time after the end of the loading of the application.  Is there a property I can set for the drop-down list box don't select anything once that the data meet the ArrayCollection collection?  I just always to choose a white so that the user is obliged to select something from the list after loading in...

    Info on the guest, in the case where it is not

    http://livedocs.Adobe.com/Flex/3/langref/MX/controls/ComboBox.html#prompt

    http://blog.flexexamples.com/2008/06/01/setting-a-prompt-on-a-ComboBox-control-in-Flex/

  • Is it possible to hide form fields that have been chosen not at all in a confirmation of the web form page?

    I have a form of mutli-step complex, in which visitors build their own party. There are several option "Add-ons" that can be selected by entering a number in the entry, depending on how much the visitor wants. Would be nice NOT to fields if the visitor does not enter a number. Any thoughts? The page (in production) is linked below.

    parts

    Hey,.

    You can hide the «extra"fields in a first time.» Then, using javascript assign an entry (https://api.jquery.com/keyup/), so whenever keyup event that users focus at the entrance and enters a value you check if the number is greater or under the visitor counter, you need. Then, if it is to show the hidden fields.

    Hope this helps,

    Mihai

  • By selecting the text box to change the text field

    I worked on a form to allow suppliers to fill their reports of endoscopy online.  I'm trying to do something very simple.  If a user selects a check box change the value in a text field.  Either we allow the code to run once.  It will change the value once - even if I think it's to set an incorrect value in the code - but that is neither here nor there at this point.

    Here's the code that should work in my opinion.

    Form1. EndoscopyPage1.TestChkBox::click - (JavaScript, client)

    If (this.rawValue == 1)

    {

    TestTxt1.rawValue = "ON"; the user cannot enter field

    }

    on the other

    {

    TestTxt1.rawvalue = "off"; the user can enter the field

    }

    I tried the following as well

    If (TestChkBox.value = 0) then

    TestTxt1.editValue = 'Off ';

    endif;

    If (TestChkBox.value = 1) then

    TestTxt1.editValue = "ON";

    endif;

    I have attached the file as well.  My trial fields are in the middle of the first page.

    It's just a typo. You typed rawvalue rather than rawValue "V" must be upper case.

    See the attahed to the snap.  It works for me after you change this property.

    Nith

  • Show/hide multiple fields on list drop-down choice to help if else

    Goal is to display or hide the three fields according to a choice of menu drop-down. If show X, hide if Y.

    How a syntax on line error 6 when adding to the trigger mouse-to the top of the field drop-down list.

    Are several actions allowed for each if condition?

    if(event.target.value = "Yes")
      getField("Top_inches").display = display.visible;
      getField("Top_numerator").display = display.visible;
      getField("Top_denominator").display = display.visible;
    else
      getField("Top_inches").display = display.hidden;
      getField("Top_numerator").display = display.hidden;
      getField("Top_denominator").display = display.hidden;
    

    You have at least two syntax errors. The first is that you used the wrong operator for comparison. 'Is', not '=' (this is the value assignment operator).

    The second is that you did not put blocks of code inside the curly braces.

    If your code should be:

    if (event.target.value == "Yes") {
        this.getField("Top_inches").display = display.visible;
        this.getField("Top_numerator").display = display.visible;
        this.getField("Top_denominator").display = display.visible;
    } else {
        this.getField("Top_inches").display = display.hidden;
        this.getField("Top_numerator").display = display.hidden;
        this.getField("Top_denominator").display = display.hidden;
    }
    
  • How show/hide a field?

    I'm trying to understand how toggle a field called "Aircraft" as hidden or shown, according to the text entered in another field called 'Trip '. If the value of 'Trip' is empty, I need air ' "hidden - this field is a calculated field based on the data entered elsewhere. Also, if the person changes the entry in the 'Trip' to something else that a white - I need to hide/show to switch to show - and if they delete the entry to switch back. In other words, people often change their minds and I need the "Airfare" field to account for that.

    Hope it makes sense.

    Thank you.

    It's pretty simple to do manually with a bit of javascript, for example-

    It should work OK.

  • show/hide a field (table) by using a button.

    I have a table set to hidden and want to display it using a button and hide it using the same key. If the table is not visible I don't want to be printe. Any suggestions?

    Thank you

    -Very well, it looks that it does not keep the flow of the form...

    Another work around you can use this work for you would be the following:

    1. keep this code in the button click event

    If (Table1.presence == 'hidden') {}

    Table1.presence = "visible";

    } else {}

    Table1.presence = 'hidden ';

    }

    2. in your hierarchy, click the table that you want to hide when printing, go to the case of pre-printing and put this line (prePrint is before printing)

    This.Presence = 'hidden ';

    3. now, in the event of postPrint, you can put the following line to replace the visible table (postPrint is after printing)

    This.Presence = "visible";

    Do not forget that if the Table is hidden when printing, the table appears in the postPrint.

    So if you want to avoid this problem, you can have a hidden text field that keeps track of how you should view the table after printing.

    If you do this, you can change the 'visible' to TextField1.rawValue value

    You can put the value of the text using the click event of the button field, when changing the value of the presence of the table changes the value of the text and field

    I hope this will help you!

  • JavaScript in a text field to show/hide a field calculated

    Thanks for your help. Here's the situation. I created a form with text, number fields (currency) fields and calculated fields. Fields display calculated the monetary symbol (even when there is nothing to calculate) and this is a problem for our users who want to just print the form and fill it out by hand (because the monetary symbols get in the way.). So I wanted to write a script would make it calculated fields hidden unless there is actually something is entered in the first text field (EmpID). That's what I came with (TotalCompensationRow1 is a calculated field.):

    var TotalCompensationRow1Fld = this.getField ("TotalCompensationRow1")

    If {(event.value)
    TotalCompensationRow1Fld. display = display.hidden
    }

    else {}
    TotalCompensationRow1Fld. display = display.visible
    }

    Somehow, I think I make it much more difficult that it should be. Thanks again for your help.

    Another approach would be to change the formatting of the displayed field. When using a percentage or a monetary symbol, can not suppress the display of the "0.00"or "0.00%". " But if one use the number format with no currency symbol, you can remove the display "0.00".

    Validation of currency format:

    var nDec = 2; set the number of decimal places; number & percent;

    var sepStyle = 0; style of thousands separator; number & percent;

    var negStyle = 0; negative style; number only;

    var currStyle =""; always null; number only;

    var strCurrency = ""; currency symbol; number only;

    var strCurrencyCurrency = ' $'; currency symbol; number with the currency symbol;

    var bCurrencyPrepend = false; prefix of currency; number only;

    var bPercentPrepend = false; percentage of prefix; percent only;

    Console.println (Event.value);

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

    Event.Value = "";

    AFNumber_Format (nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend);

    } else {}

    bCurrencyPrepend = true;

    AFNumber_Format (nDec, sepStyle, negStyle, currStyle, strCurrencyCurrency, bCurrencyPrepend);

    }

    Validation of the percentage format:

    nDec var = 1; set the number of decimal places; number & percent;
    var sepStyle = 0; style of thousands separator; number & percent;
    var negStyle = 0; negative style; number only;
    var currStyle =""; always null; number only;
    var strCurrency = ""; currency symbol; number only;

    var strCurrencyCurrency = ' $'; currency symbol / / number with currency symbol;
    var bCurrencyPrepend = false; prefix of currency; number only;
    var bPercentPrepend = false; percentage of prefix; percent only;
    If (event.value == 0 | event.value == "") {}
    Event.Value = "";
    AFNumber_Format (nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend);
    } else {}
    AFPercent_Format (nDec, sepStyle, bPercentPrepend);
    }

Maybe you are looking for

  • Power reaction on each screen Libretto W100

    Hello world I just bought a Libretto W100 for me and it's like a dream from afar. I have a question that I can't find the solution on this forum so far. Is it possible to leave one of the screen on / off (light only, when touch) For example, when rea

  • I can't open new tabs by clicking on the sign more, or in a new tab file

    Whereas previously it was possible to open a new tab by clicking on the "plus sign" to the right of the last open tab, or by clicking on 'file' and 'new tab', none of these options work. New tabs will open a new Web page, but a 'white' will not appea

  • Me and friends being harassed by a Skype user

    I made a post about this before, but I'm not very familiar with poster, sorry if I'm doing it wrong. I read the email I received on the actions on the user of Skype: crealstarvertifier.My friends and I have been harassed by him after the events. I tr

  • Battery not charging if the A30 Satellite we

    I have the Toshiba Satellite A30 model, and lately, charger acted upward.At least, I think it is the charger. The problem is, the charger works fine when the laptop is turned off, the led lights to indicate that he is in charge, and when I turn on th

  • NEITHER 6585 loop back and loop single temporal cycle.

    I use a NI 6585/SMU-7961 I am developing an application where I do the source syncrounsu communications.  At the moment I don't have the material which will issue for me.  I am trying to set up a situation where I can just make a loop back on myself