Subform(s) visibility

I'm trying to make visible a specific subform based on the value of a radio button. This involves two subforms - stdLayout and customLayout.
Right now, stdLayout is visible when the form opens while customLayout is invisible.
I have this code in place now:
Form initialize:
customLayout.presence = "invisible";
Radio button change:
if (this.rawValue == 1) {
customLayout.presence = "visible";
}else{
customLayout.presence = "invisible";
This works fine to make customLayout visible, but I'm at a loss for code to make stdLayout INVISIBLE at the same time. Obviously I only want one visible at any time.
Any help is GREATLY appreciated!
Thanks
Mike

Hello, I just joined the forum today. I am new to this app (v.8) and am learning to create a form. I have a question that looks like it belongs in this thread.
Here's my situation: the company is finally setting up an intranet, and we are slowly moving to .pdf file distribution instead of MS Word. I'm going through an employee status change form done in Word, using document protection and text fields, checkboxes, drop-downs, etc., and I'm re-creating it in LiveCycle.
That part was easy, and I learned the basics of the app, but now I want to make a leap to another level. This form tracks access to various systems and apps, which varies according to the division of the business that the employee is in. When I createds all the checkboxes and drop-downs, etc., I clustered them into subforms.
This thread asks about a radio button value determining subform visibility. I'd like to know if a value in a drop-down can determine visibility. Our hope is that when HR chooses a value in the Division drop-down, then the form will only display the systems and apps that a person in that division would normally have access to.
Can this be done? and where are you entering that code you sampled here?
Thanks,
- A

Similar Messages

  • Alertbox on submit email if a subform is visible

    Hello,
    I'm trying to create a script that would show a alertbox reminding the user that he must join needed files to the email before sending it. But this message must only be shown if a specific subform is visible, if it is not, than it must tranfer to the email directly.
    I'm using the Lc subit by email button that is standard in Lc ES2 and I've been meddling around and I can't find a script for my probleme. I've used the general alertapp. but I really need the message to appear only if my subform is visible.. Hoping someone can help me with this. Thanks in advance for all your help.
    Melanie

    Hi,
    you can use a script in the preSubmit event of your Mail button.
    It will check the visibility of you subform and prompt a message if it is visible.
    form1.#subform[0].EmailSubmitButton1::preSubmit:form - (JavaScript, client)
    if (Subform1.presence == "visible") {
            // Show a warning message
              xfa.host.messageBox("STOP");
            // Cancel the submit process
              xfa.event.cancelAction = true;

  • Problem with subform (hidden & visible)

    I am new to Javascript but feel embarrassed to ask since I have some programming background. Putting my pride behind me. I am trying to use a drop down list ("A" & "B") that will hide or make visible two subforms ("Subform1" and "Subform2"). This is pretty basic but I can not get it to work. Any suggestions?
    if (this.rawValue == "A")
    Subform1.presence = "visible";
    Subform2.presence = "hidden";
    else if (this.rawValue == "B")
    Subform1.presence = "hidden";
    Subform2.presence = "visible";

    Hi,
    I have the same problem even the form is save as a dynamic form but I am using Switch case as below:
    var sNewSel = this.boundItem(xfa.event.newText);
    switch (sNewSel)
    // Option 1 - Out-of-Agency Training
    case "Out-of-Agency Training (Send to D/D/O Training Coordinator)":
    xfa.resolveNode("Form1750.MainPage.SubSignature.EmployeeSig").presence = "visible";
    xfa.resolveNode("Form1750.MainPage.SubSignature.EmpDate").presence = "visible";
    xfa.resolveNode("Form1750.MainPage.SubSignature.CommSig").presence = "invisible";
    xfa.resolveNode("Form1750.MainPage.SubSignature.CommDate").presence = "invisible";
    break;
    ... option 2
    .... option 3
    ..... option 4
    It works at first but it does not after the form is submitted as all of the fields are visible.
    Any help would be appreciated.
    Thanks in advance,
    Han Dao

  • Subform Set visible in Design View and not PDF preview

    I have created a form and used several subform sets, all of the sets and subforms within it are set to visible, but when I look at the PDF preview and when I upload the form into my internal system some of the sections are missing. I am not sure what is wrong, can someone please help!?

    A subformset is used when you have numerous different subforms that can be laid down but the imbound data stream will determine which subform to lay down. For exmple if you have a form that has a a different verbiage based on state then you can have all of the subforms defined that could possibly go there then when the data is merged the state is derived and only the one for that state is used.
    Hope that helps
    Paul

  • Three pages of subforms made visible by checkboxes

    Hello,
    I have 12 checkboxes on page 1 of my form. There are 12 subforms (4 on each page for a total of 3 pages) which contain identifical tables of header row and Row1 in each subform. One subform for each checkbox. All are name similarly but with different names. Checkboxes are set to On=1 and Off=0.
    The object is to have a checkbox display or hide a subform.
    They work but only one page works at a time.For instance if I get page 3 working then pages 1 and 2 don't work and so forth.
    Here's the script in the check box click event:
    if (this.rawValue == '1')
              table1.presence = "visible";
    else if (this.rawValue == '0')
              table1.presence = "hidden";
    Any thoughts on what's happening?
    Thanks,
    MDawn

    The form you posted has the design password protected.
    My guess is that the path to the pages/subforms referenced in the checkbox scripts is not complete - or you are reusing names.
    If you can share the password with me, I can look further.
    Mark
    [email protected]

  • Making Subform Instances Visible/Invisible

    Hello,
          I am trying to loop through the Subform Instances of the form and trying to make them visible/invisible on the click of a Check Box. The script seem to run just fine but the values nothing happens to the subforms. The script is written on the CLICK event of check box and is as below:-
    ----- HAP_DOCUMENT.APR.HAP_DOCUMENT.Positions.DATA.CHECK_BOX::click: - (JavaScript, both) ----------
    var
    nCount = APR.HAP_DOCUMENT.T_ELEMENTS.DATA.instanceManager.count;
    //var plan_value = this.parent.PLANS.rawValue;
    var
    plan_value = this.parent.parent.parent.Storage_Form.PLANS.rawValue;
    for (var nItem = 0; nItem < nCount; nItem++) { // Begin Loop T_ELEMENTS after the Instance is created
    var sub_Tele = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"]";
    var tName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA";
    var sCount = xfa.resolveNode(tName).instanceManager.count;
    for (var sItem = 0; sItem < sCount; sItem++) { // Second Loop on T_COLL_CELL
    var fName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA";
    var tCount = xfa.resolveNode(fName).instanceManager.count;
    for (aItem = 0; aItem < tCount; aItem++){ // Third Loop on T_FIELD
    var gName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"].simpleField.VALUE_STRING";
    var lName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"].simpleField.CAPTION";
    var subName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"]";
    var aVal = xfa.resolveNode(gName).rawValue;
    var bVal = xfa.resolveNode(lName).rawValue;
    var subVal = xfa.resolveNode(subName).presence;
    if (bVal == "Position Number"){
    if (aVal == plan_value) {
    if ( this.rawValue == 1) {xfa.resolveNode(subName).presence
    = "visible";}
    else {xfa.resolveNode(subName).presence
    = "hidden"; }
    Is there any other way of addressing the properties of the Subform Instances? Could any please help me as to why there is no effect on the subforms?
    Regards,
    Shishir.P

    Is the form saved as dynamic? Are you getting any errors in the javascript console?
    Paul

  • Visible/invisible subform based on choices from 2 dropdowns

    Does anyone have an example of a form with subforms being visible/invisible based on the answers of 2 dropdowns.
    thanks for sharing

    Hi Jagan,
    It is probablly just how you set up the script.
    For starters, for Yes/No choices I think you would be better to use radio buttons instead of checkbox objects. So for example you would have four different radio button exclusion groups, each with a Yes and No radio button. Then in the Object > Binding palette, you would set the Yes value to 1 and the No value to 0.
    This way you can sum the four radio button exclusion groups and if the total value is >=1 then change the presence of the text field and highlighting to suit.
    There are some examples here that might help:
    Scoring options: http://assure.ly/uiKS6f.
    Tracking interaction (checkboxes): http://assure.ly/xDbtbx.
    Hope that helps,
    Niall

  • How to make a checkbox that makes a subform visible also go to the subform

    Newbie here - no java knowledge. I have a subform that becomes visible when a checkbox is used. How do I make the form go to the subform as it becomes visible? Thanks for your help! RL

    Sorry - I was reading your messages in my email, not on the forum page.
    My original form is very long, with many options on it. When an option is chosen, I have a subform become visible, but the user would have to scroll down to see it. I'm making the form for teens, and want it to be foolproof and bombproof. So I need the selection of a checkbox to take the user directly to the subform. See "What will you be performing?" with vocal, musical theatre, theatre, dance, instrumental checkboxes on the attached form.
    I have been using:
    if (this.rawValue == 1){
            VocalSubformPage2.presence = "visible";
    }else{
            VocalSubformPage2.presence = "hidden";
    event.target.pageNum = 1;
    as suggested by Patrick, but it isn't working consistently. I have a subform for each category as a separate page. The content is positioned to stay on that page, and can't flow into another. Thanks for your help.
    Randee

  • Dropdown selection to make a subform visible

    Hi I am trying to work out how to make a subform visible/invisible dependant on the selection made in a previous dropdown box. Any ideas?

    Add the following javsscript code in the change event:
    var selection = xfa.event.newText;
    if(selection == "visible"){
    subform.presence = "visible"
    else {
    subform.presence = "hidden"

  • How to get a hidden subform to appear?

    In my Adobe LCD book it tells me I can do all this nifty stuff with invisible and hidden subforms and objects. But it doesn't go into detail as to HOW to do it.
    I know I need to set the presence of the subform to hidden... but after that??
    Background:
    I am creating a dynamic form which will have 2 radio buttons at the very top -
    one for "changes required"
    one for "no changes required"
    Between the radio buttons and signature boxes I have a subform (with some instructions and a text field) with presence set to Hidden (exclude from Layout).
    At the bottom of the form are signature boxes.
    Two problems -
    1) The space where the hidden subform is stays exactly the same - in other words, the signature boxes do not move up.
    2) In the interest of having a nice, tidy printout, I want to have the subform containing the instructions and the info text field appear when "changes required" is selected. I know this is not a big deal except that I cannot find a simple instruction on how to do it.
    I appreciate help - everyone has been so good to me on this forum. I hope someone can come through for me again. Even if you provide an example from which I can extrapolate the answer, or a snippet of code, or anything. I find that many books and help systems speak to what the software can do but without explaining how we actually make it work. Thank you!
    Marla

    Hi Bruce, thanks for your reply.
    I think I was not clear in my question, though you have a point about the subforms.
    My form is 1 page. It's dynamic, but I don't have fields that will be expanding down the page.
    What I want to happen is when someone clicks the "Change Needed" radio button, a subform appears with a text box of instruction and a text field in which the person can type what the changes are.
    Initially, when someone sees this form, it is not visible. Only upon clicking the Change Needed button does it appear. Or at least, that is what I want to make happen.
    I decided that it's not important that the signature boxes at the bottom move at all whether the Change subform is visible or not, based on the clicked button.
    Does that explain better what I want to happen? It's pretty simple yet I cannot figure it out. Do I use java script? Do I type something somewhere? What tools do I use to make this appear?
    thanks

  • How do I create a dropdown with three options so that only one is visible in a form (non-flowable)

    I'm working on a form which needs to provides three options for the user out of a drop down list. When the user chooses one option, only that subform is to be visible. Two of the three subforms are text fields, and the third subform is a series of fields which are editable by the user.
    How do i create a dropdown with three options in it, so that in each instance only one subform is visible? This needs to happen in the same space on the main form.

    Hi Nellie,
    Here is the form back to you. There were three main issues:
    In order for dynamic behaviour, like showing and hiding, the form must be saved as a Dynamic XML Form in the save-as dialog.
    While you can use a minus sign when naming objects and subforms, it will cause scripts to fail. I have changed the name of the subforms so that they now use an underscore.
    The dropdown had specified values in the Object > Binding palette (1, 2, 3), so the script needs to use these in the if statements.
    When sharing forms on Acrobat.com, the best option is to select the file in your workspace and then click Publish. This will make it available to anyone who has the published URL.
    I hope that helps,
    Niall

  • Multiple subforms in the same place

    I am working on a dynamic form with a flowed subform for Page 1. I would like several different subforms of information to occupy the same space on the page depending on text selected from a drop down list. How do I get one subform to be in the same x/y of another? I'm trying to disprove that old adage that two things cannot occupy the same space at the same time.
    Thanks for any help you can offer.

    Hi,
    What you describe sounds like "invisible" instead of "hidden". Invisible objects still occupy space--hidden objects don't any occupy space. Be sure to use "hidden" to get the results you want. In addition,
    What I believe what you need is to use a Flowed container (with hight set to expand) and a script that will change the presence of the different subforms to "visible" or "hidden". These subforms will get out of the way when they are "hidden". As Ida Eve has it shown above.
    And, if there is a text field in one of those subforms, it can expand--you will want it's parent subform to be "Flowed" as well. Here's a representation of the layout::
    <MainSubform>                                                                 //Flowed
         <Subform1>                                            
              <someStuff></someStuff>
         </Subform1>
         <Subform2>
              <someStuff></someStuff>
         </Subform2>
          <Subform3>                                                            //also Flowed
              <expandableTextField></expandableTextField>
         </Subform3>
    </MainSubform>
    So, Subform1, Subform2, Subform3, will reveal themselves in the same spot (individually) depending on the dropdoen box.
    Subform3 also should also be set to Flowable because the textField set to expand.and you want the subform parent to expand with it.
    Stephen

  • How can I force an "invisible" object to become "visible" when a numeric value is entered?

    So I’m trying to force an “invisible” subform to switch to “visible” when a numeric value greater than or equal to 22 is input into a numeric field.
    I can’t get the following javascript code to work properly with any event. I’ve tried the change, calculate, validate, events and a few more to no avail. The only event that kind of works with the javascript code I’m using is the validate event. When I input the code into the validateevent, the invisible subform becomes visible when an amount equal to or greater than 22 is entered, but when ANY amount is input into this field, an error message pops up that says “NumericField4 validation failed” and the user has to click “Ok” to get rid of the pop up box.
    if (this.rawValue <= 22) {
            Approval23.presence = "hidden";
    if (this.rawValue >= 23) {
                Approval23.presence ="visible";
     Here’s a link to my .pdf: http://www.filedropper.com/salgovform
    The object field that the javascript code is contained in is called: NumericField4 (a.k.a. New Job Grade)
    The subform that I want to become visible when a number greater than 22 is input into NumericField4, is called Approval23.
    I’ve based the javascript code I used on information I gathered from the following thread and associated .pdf . . .
    Thread:
    http://forums.adobe.com/message/1982919
    PDF in thread with the javascript code:
    http://forums.adobe.com/servlet/JiveServlet/download/1981437-8059/Sample_SW.pdf
    I’m pretty sure I’m just missing one little thing that’s throwing everything off!
    Any help would be GREATLY appreciated.

    Hi,
    The following works in the exit event of the numeric field, where the language is set to JavaScript:
    if (this.rawValue <= 22) {
         Approval23.presence = "hidden";
    else {
         Approval23.presence = "visible";
    Here is your form: https://acrobat.com/#d=3gRNt6WBY2bE0K7en4CnSA
    Hope that helps,
    Niall

  • Subform -Hide depending on a Condition

    Hi,
    How can we hide a subform depending on a condition?
    I mean if my internal table for that entry in initial.It should not display the subform.
    Also,
    I want to get rid of all outside boxes borders in output and have vertical lines which needs to be ending dynmically?
    Can we get it through line from library?
    rgds
    vara

    Hi Vara,
    1) How can we hide a subform depending on a condition?
       I mean if my internal table for that entry in initial.It should not display the subform.
    In the event "form:ready" of your table subform write the condition like:
    if (internaltablesubform.field.rawValue == null)
        subform.presence = "hidden"; (Subform full path which u want to hide)
    else
      subform.presence = "visible";
    2) I want to get rid of all outside boxes borders in output and have vertical lines which needs to be ending dynmically?
    Can we get it through line from library?
    If I understood your question correctly, for all of your fields you dont want to have borders like a box but you want to have one vertical line at the end of the each field.
    for making your fields with out border you can do the following:
    select the field and from the object paletet, go to field tab there you can find the option "Appearance"
    there select none.
    If you want to get vertical line at the end of the text field: select option "Custom" from the same "Appearance" there you can change the edges individually.
    And  for setting dynamically , under Layout option beside Object, there are options called "expand to fit"
    for both width and height so you can select  those option which ever is applicable for you.
    Hope it should solve the problem.
    Regards,
    Ravi.D

  • Reg : show/hide subforms under buttons in Static page(Java Script)

    Hi All ,
    I am creating Adobe Interactive form(static page). In this page have 3 buttons.For each button one subform is there. I want to show/hide subforms under buttons.
    I am using javascript. Please give me the code for this.
    Thanks
    Risha

    Hi Risha,
    can you explain your question like do u have some condtions to show or hide the subform? OR if u click
    button you want to show the subform and by default subform should be hidden something like this?
    Normally for showing the subfrom on click of the button: (By default make your subform invisible from its properties).
    Select the button and in the click event select java script option and write the following code:
    Subform.presence = "visible";
    (*you have to give full path of the subform instead of only subform name).
    With Regards,
    Ravi

Maybe you are looking for

  • Don't want to right click on a PDF link to save it!!!!

    Hi can any one help me to download a .pdf file with out doing save as but just to click on it and it will automatically go to the Save dialog box!!! I have a view document option and a download option on my page and it will be completely useless if t

  • TV Audio to TC (wifi) to iPhone, is this possible?  How do ya it?

    Why? I'm hearing impaired (that's what happens @ 65) and prefer to use equipment I have, the freedom to move about and the light weight earbuds.  Those TV audio aids are too cumbersome and stupped looking.. It would be very convenient to plug the ear

  • Oracle Payable - Payment Batches error " APP-SQLAP -10380"

    Hi, I still trying to get my head around this module but i get this error message - APP- SQLAP-10380 When trying to create a batch payment on 11i, i got "You cannot select this payment because it is in use by another payment batch. I have gone to Act

  • Deleted my saved passwords

    Duplicate I will lock this please continue with /questions/964054#answer-453082 ~J99 i accidentally deleted all my saved passwords. can i get them back? i have been using sync but i have not told firefox to sync since i deleted them.

  • Importing functions and settings

    Maybe and probably quite basic. After reading various topics and help files could not find specific answers. I was wondering when using Itunes import function to your library, is the only way from CD?? I connected my shuffle and Itunes finds by IPOD