Show/hide field on all pages problem

I try to use a script to show/hide document level menu (via a drop-down list) field on a 6 page document.

If my domain is named "P1.field" on page 1, P2.field on page 2... How can etc, I do for States to field by doing the same?

Right now my state of field changes on page 1 only.

Just do it to all fields... Either in a loop or one by one. You can use something like this, for example:

for (var i = 1; i)<=6;>

this.getField("P"+i+".field").display = display.hidden;

Tags: Acrobat

Similar Questions

  • Show/hide fields based on T/F control - only showing or hiding, not both.

    Hi Forum,

    I'm looking to show/hide fields address based on a T/F control (or a single entry check box).

    My online form has a number of business address fields, a T/F control and a number of postal address fields. I want the mailing address fields to hidden when a user clicks on the box 'As Above' (and demonstrated once again if they click this box once more).

    I used the sample code (https://docs.oracle.com/cloud/latest/process_gs/CPRCW/GUID-F3BD3386-F333-45C6-AA56-C77136D169E5.htm) as a starting point for my Web form rule and it works as expected the first time that a user clicks area T/F (i.e. He's hiding the post fields) but it does not work the second time they until it clicks (where I assumed that fields would still be visible).

    The T/F box has the following options:

    true = as above

    false = No

    And my web rule looks like this:

    If (AsAbove.value = true) {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }


    I tried the same thing (with similar results) using a Checkbox control with a single option (according to the example code)

    If (PostalAddressCheckbox [0] .value == 'As Above') {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }

    As verified does not seem to be supported, is there another way to accomplish what I'm after, or I missed something somewhere simple (and y at - it documentation on the T/F control)?

    See you soon,.

    James.

    Hello

    Web Forms address these true-false as the boxes and, as such, in the form of tables.

    You can see if you try to print the TrueFalse value. You should get something like java object lang @XXXXXX

    Try to put the code as follows (in bold and underlined):

    If (AsAbove[0].value = true """""") {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }

    This should do the trick

    See you soon

    José

  • Avoid complete when page is rendered dynamically show/hide elements in a page

    Hi experts,


    I use Jdev 11.1.1.5. My use case does not show/hide multiple buttons/panelBoxes on the same page.

    My approach is to define the rendered property pointing to a session variable

    <af:panelBox  rendered="#{sessionScope.render_panel1}"
    <af:commandButton action="#{backingBeanScope.myBean.configureRenderButtons}" rendered="#{render_button1}"/>
    

    .. .and go to the same page by using an action method in a managed bean:

    public String configureRenderButtons() {
       JSFUtils.storeOnSession("render_panel1", "true");
       JSFUtils.storeOnSession("render_button1", "false");
       ...
      return "same-page.jspx"
    }
    

    My problem is that I noticed that this full page is rendered whenever I press the button. So as soon as the page has grown in size, it became a bit slow for end users.

    Could you please advice on this?

    Kind regards

    Jose.

    I got the solution.

    I changed:

    (1) changed to visible, rendeded

    (2) partialSubmit added to the button

    (3) partialTrigger added to the component I need to show/hide (panelBox)

    (4) action changed to actionListener

    
    
    

    Hope this helps (and hope it's a good practice, please post!)

    Jose.

  • How can I have 7 txt calculate and/or show/hide fields?

    I have 7 fields txt. As follows, ST1, ST2, ST3... ST7. With 1 TotalST field for all areas 'ST' (that calculates totals fields). Is what I want to do, when the ST fields are not met, then the TotalST field would be hidden. When one or all the fields St are filled the TotalST field would be visible, but also calculates the fields of ST. Then the TotalSt would hide if I delete the entry of all fields of ST.

    At the moment, I have the calculation works fine (fairly simple) by using the simplified window. But, in my opinion, it takes a javascript that will have to be placed in the window of custom calculation. So, can someone provide a script that would do what I hope to do? Thank you.

    Sure. Use this code instead of the one above:

    Event.Target.Display = (event.value == 0)? Display.Hidden: display.visible;

  • show/hide fields with percentages

    I'm trying to find a script to show/hide a field as a percentage that is located in one of the fields. The script that I usually use to base numbers is:

    var r1 = this.getField ("V1");
    var r2 = this.getField ("V2");

    R1. Hidden = true;
    R2. Hidden = true;

    If (event.value < = "100")
    {
    event.willCommit = true;
    {

    R1. Hidden = false;
    }
    }

    If (event.value > = "101")

    {

    event.willCommit = true;

    {

    R2. Hidden = false;

    }

    }

    So I need basically the same thing again but I need to be field appears if "38.00%" or above is entered. If anything lower then it is entered, I need 2 field is displayed... I can't make it work once the decimals are here.

    Thank you in advance for your help!

    The percentage format is just for display and rounds the value of the current field, the value of the actual field is the decimal number created by the division or entered by the user.

    100% is entered as 1.00 but if the result of a calculation, it could be 99, 5 - 1.4. If you want to compare the calculated value, you may need to round the value of the fields for the same number of decimal places that display area. You should be aware that using the Math.round of JavaScript method may cause an error with numbers rounding floating-point. You can use the util.printf method in Acrobat JavaScript to properly round a field value.

    I also wouldn't quotes on numeric constants.

    var r1 = this.getField ("V1");
    var r2 = this.getField ("V2");
    R1. Hidden = true;
    R2. Hidden = true;

    If (util.printf ("% 1 .2f", event.value))<= 1.00)="">
    R1. Hidden = false;
    }

    If (util.printf ("% 1 .2f", event.value) > = 1.01) {}
    R2. Hidden = false;
    }

  • Show / hide the DropDownList selection Pages

    I'm trying to show / hide the last page of an audit report according to which city is selected in the drop-down list.

    The code I use is:

    If

    ('4' == xfa.event.newText)

    {

    Page7.presence

    = 'visible ';

    }

    Page 7 has the value "hidden" as I will only show / selected print if some cities are (Bundaberg being one of them)

    The drop-down list has been fixed values then '4' = Bundaberg.   The script is on a change event.

    Can anyone help please this code does not work.

    Thank you.

    Jenny

    Ensure that the form is saved as "dynamic".

    N.

  • Show/hide fields based on the drop-down list

    Hello

    I'm trying to show/hide subforms with a drop-down list selection. I found a lot of information on the subject and ended up with what my script:

     form1.Page1.Division::exit - (JavaScript, client)
    
    switch (Page1.Division.rawValue)
    {
       case "1":
       SubformZZI.presence = "visible";
       SubformZZR.presence = "hidden";   
          break;
     
       case "2":
       SubformZZI.presence = "hidden";
       SubformZZR.presence = "visible";       
          break;
    }
    
    

    However, it does nothing when a selection is made in the drop-down list. I have the "SubformZZI" initially defined as 'Visible' and the 'SubformZZR', originally defined as "hidden".

    Any suggestions?

    Kind regards

    ZeroZone

    Check if the form is saved in dynamic form. File-> save as and choose dynamic for the type of shape...

    Other that that, you should check if you have given the values for the selection of the drop-down list as '1' and '2' in the tab of the control's binding.

    Thank you

    Srini

  • I have problems with the radio buttons and prompting to show/hide fields.

    For example, the code below works but the for loop when entering 1 choice remains between the TI-57-119 mask fields all fields in my document. any help would be apreciated. choice 2 works fine.

    function updateFormField()

    {

    var v = this.getField("Group50").value;

    If (v == 'Choice1') {}

    for (var i = 57; 57 < = i < = 119; i ++);

    this.getField (this.getNthFieldName (i)) .display = display.hidden;

    }

    }

    else if (v == "Lendemain2")

    {

    this.getField("Text58").display = display.hidden;

    this.getField("Dropdown66").display = display.visible;

    this.getField("Text67").display = display.visible;

    }

    }

    updateFormField();

    There are chances that you can rename the fields so that they are more easily treated when you use a script? For example, if you have added a prefix such as "g1". (meaning group1) so that the domain names were like:

    G1.text57, g1.dropdown58, g1.text59, etc., the declaration if code could be simplified a little:

    If (v == 'Choice1') {}

    this.getField("g1").display = display.hidden;

    }

    } else if (v == "Lendemain2") {}

    this.getField ("g1. Text58") .display = display.hidden;

    this.getField ("g1. Dropdown66") .display = display.visible;

    this.getField ("g1. Text67") .display = display.visible;

    }

    This is called hierarchical domain naming, and it is easy to control large groups of fields. If you don't do it consistently name fields so that they are easier to reference in a loop, (e.g., text57, text58, text59,..., text110), then you will need to use a single statement for each field that you want to control, complicating the code and makes it more difficult to maintain.

  • Show/hide fields based on the user's selection

    I know little of Javascript, but my first attempts to integrate it in Acrobat are bothersome. I have created a simple form where the user via a check box the number of people that he or she must register, then the form shows that several fields to complete. I tried to make it work with a single field, before I add more.

    In this example, I'm trying just to get the second hidden registered field if the user checks only 1 person to register. (I already know that I have issues when it comes to hide several fields).

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

    this.getField("Registrant2").display = display.hide;

    }

    Given that I do not know what is the value of exports, try this:

    If (event.target.value! == 'Off') {}

    this.getField("Registrant2").display = display.hidden;

    }

    You can add an else clause so that the field is displayed when the check box is not selected:

    If (event.target.value! == 'Off') {}

    this.getField("Registrant2").display = display.hidden;

    } else {}

    this.getField("Registrant2").display = display.visible;

    }

    If this does ' t work, you don't maybe not the correct domain name. Verify that the console (Ctrl + J) to see all JavaScript errors are reported.

  • How show/hide pictures on multiple pages

    Depending on the location of the image (logo) on the changes of forms.

    How can I place the same image in the upper left corner of the page of 5-25 pages in Acrobat with JavaScript?

    Yes, it would make your life much easier, as buttons (like all other form fields) can be easily duplicated on multiple pages.

  • show/hide fields based on the drop-down list of choices

    I have a field from the drop-down list with three choices. Based on the selection, I need a specific text form field to appear and the others to stay hidden. (Or if it makes the code cleaner, the resulting field could be a drop-down list, too, with the selected choice.) I don't know Java well enough to extrapolate the code from the examples online and it fit my forms. I can provide an example of form. Thanks in advance for your help.

    There are ways to run this.  the easiest for you would be to add this script to the event (calculation of the Properties tab) to calculate the field that must be hidden.  Take notes, all "/ /" is some tips for you to understand the code.  You will need to put this script in all the areas you want to replicate the behavior, change the value depending on what you want to accomplish.  the word 'event' means myself to make you understand.

    If (this.getField("dropdown").value == 'put value here') {//replace "drop down" with the name of the drops}

    Event.Target.Display = display.visible;

    }

    else {}

    Event.Target.Display = display.hidden;

    }

    This works if you have a small amount of fields.  If you manage to have a large number of similar fields, let me know because there are other, faster ways.

  • Show/hide field

    I was wondering if it was possible to hide certain fields before the form is submitted/sent by e-mail so that the person who receives this form will not be able to see these fields but still be captured by the database?  Is this feasible?

    Here is an example that may give you some ideas...

    https://Acrobat.com/#d=e44sIFR9uXi1P4nrB * ZQYQ

    In this example, I placed a subforms with text in them. When you click on email, a subform is hidden in the event of pre-press. After receiving the e-mail, you will see a subform.

    Thank you

    Srini

  • Hide/show a field

    I'm puzzled. I created a box, and I "Mouse Up" to show a hidden field. But when I uncheck the box, the field is still visible. I'm very novice and could use some advise. Thank you!

    Using a checkbox to show/hide fields can be done, but don't not using a mouse event like that it will be a permanent change.  Instead, you can use two buttons, one to hide a specific field and the other to show.  Alternatively, you can use a checkbox and script a bit to work.  C1 is the name of my box and text 2 is the area I want to show or hide. I also gave my box an export value of 2 just arbitrarily.  By placing the script in the field calculate Text2, it will determine if the checbox is verified through tests to see if it has a value of 2, it will have only if verified.  If it isn't then the field is hidden if it is not, then field is visible.  It's a start.

  • How to make the common control for all pages button in TABCONTROL?

    Hi all

    I use a TABCONTROL to my application. I'm going to STOP and REGISTER the control. I have to show this key to all pages in a TABCONTROL. How can I do?

    Kindly help me?...

    Hi srinivasan,.

    If you want to keep 'Save' and 'Stop' common, why would you keep the tab control? Your tab control takes all the space on the front panel? If so, you can have SAVE and STOP on other vi, and you can call this (MODAL) vi.

  • Limiting a test area enter on all pages of a PDF document.

    I created the following code to use the menu option

    for the creation of a date in which field the current date will be

    introduce the document is printed.  I'm confused as to how it is the addition of

    the field to all pages and not just the page that I am currently editing. Could someone help with this. I see the statement defining the variable p but confused on how it is added to each page, and not only the last page of this booklet PDF.

    app.addSubMenu ({cName: "Footer", cUser: "Date", cParent: "File", Nonprofits: 20});

    app.addMenuItem ({cName: "Set Date time (Filename) ', cParent: 'Footer', cExec:" SetFooter (1) "" ""});

    app.addMenuItem ({cName: "-", cParent: "Footer", cExec: "{}"});

    app.addMenuItem ({cName: "remove Date time (Filename) ', cParent: 'Footer', cExec:" RemoveFooter (1) "" ""});

    function SetFooter (ARG)
    {

    var inches = 72;
    for (variety p = 0; p < this.numPages; p ++)

    {

    If (ARG == 1) {}
    aRect var = this.getPageBox ({nPage: p});
    aRect [0] += 6.20 * inch; from the left edge
    aRect [2] = aRect [0] + 1.5 * inch; from the upper left corner of the page.
    aRect [1]-= 7.08 * inch; top edge of the paper
    aRect [3] = aRect [1] - 18; and height 24 points


    var fd = this.addField ("date", "text", p, aRect);
    fd.textFont = fonts. HelvB;
    fd.textSize = 10;

    }

    var myWillPrintScript = ' var fd = this.getField ("date"); \r'
    + ' fd.hidden = false; \r'
    + ' var d = new Date(); \r'
    + ' fd.value = (util.printd ("mmmm yyyy", d)); \r'

    var myDidPrintScript = ' var fd = this.getField ("date"); \r'
    + "fd.value =" ";" \r'
    + ' fd.hidden = false; \r'

    Now define scripts to run on the will / did print events.
    this.setAction ("WillPrint", myWillPrintScript);
    this.setAction ("DidPrint", myDidPrintScript);


    } }


    function RemoveFooter (ARG)
    {

    If (ARG == 1 |) ARG == 3) {var x = this.removeField (' date') ;}

    If (ARG == 2 |) ARG == 3) {for (var p = 0; p < this.numPages; p ++)}

    {

    var x = this.removeField (String ("xftPage" + p + 1)); }

    } }

    You must remove the loop for upstairs, including its opening and

    closing brackets and replace by:

    p = this.pageNum;

Maybe you are looking for

  • A WiFi connection, dropping intermittently

    Any help appreciated Mac Book Pro 15 inch, early 2011 OS X 10.9.5 Processor 2.3 GHz Intel Core i7 16 GB 1333 MHz DDR3 Reset SMC has been set but drops after awhile. Also temporarily successful were: Disconnect battery Reset the NVRAM Since then, is h

  • Mozilla is suggesting that I have updated FireFox - does it cost? How many?? Thank you.

    I would like to know if Mozilla will supplement Me Iprimus my account if I say YES to his (Mozillas Question). I'm checking e-mails at the moment, and I really need to Get offline connection and Cook dinner! a quick RESPONSE is appreciated. Kinest co

  • Satellite P20-102: Questions about changing CPU

    Hello I have a SP20-102 which has a 3.40 Ghz P4 processor. 800 Mhz FSB, 512 KB L2 cache with HT enabled - I think the sSpec is SL793. It seems that the cooling mechanism cannot quite in the face of this processor and fan is on a lot, especially when

  • Re: Compact Pressario SR5109UK

    The maximum memory I can put in this PC is 2g, should she be 2X1g pair or I can stick it a single module of 2g. The PC has only 2 ram slots. Product specifications page does not only say that it may take maximum 2g. Can you help me please? Thanks Mar

  • SOLVED problem with my DVD/CD _

    Hello I have a problem with my DVD/CD. Although Device Manager says, "this device works properly.". It does not at all. I'm very suspicious of the cable connections. The cable has been severely pinched by my grandson. It did not close, and instead to