Hide all instances of text fields, instead of only first instance?

Hi All, Been scouring looking for an answer to this, and tried several things that I haven't been able to make work for me.
I'm creating a quote form in LC Designer.
I've got buttons to add or remove instances of a subform. The subform contains 5 fields. I need to add a checkbox that will hide only 2 of the fields within the subform when checked, and when unchecked, show them again. I am able to make this work, but only for the first instance (instance 0?). How can I make this work so it hides these fields from each of the visible instances?
You can view the form at: https://workspaces.acrobat.com/?d=GVqRa5BfyIKxpkAVBxje3Q
For anyone that is feeling abitous, what I really wanted to do seems impossible, so I'm going with the above as a simpler workaround. What I really want to do is have a check box that when clicked, will hide the quotation form, and make the purchase order visible, carrying over any field data into a new table on the Purchase order form from the quote form. I've attached this form at https://workspaces.acrobat.com/?d=pqpsXx5VPi*LkMeVKrX57w
I understand that I need to create an XML schema to accomplish this, but can't figure out for the life of me how to actually create the schema. I can only find info on how to bind the data source once it's been created.
I would be forever grateful to get a hand with getting either of these forms to do what I need.
Thank you!

Hi Barb,
The first question is fairly easy, you need do exactly what you were doing but for all the rows, so;
var newPresence = (this.rawValue == "1") ? "hidden" : "visible";
var rows = page1.resolveNodes("Subform2[*]");
for (var i = 0; i < rows.length; i++)
    var row = rows.item(i);
    row.Col2.presence = newPresence;
    row.Col4.presence = newPresence;
The second one can be done, but is a bit fiddly.  I have updated your sample, https://workspaces.acrobat.com/?d=jLYZGae--BiZ0khRbZqvuA
This relies on having two top level subforms, one for Sales_Quotation and one for Purchase_Order, when you click the checkbox the name of the top element in your data connection is updated, the form is remerged and rendered with the top level subform that matches the new name.  Look in the hierarchy tab and you will see what I mean by top level subform.  Any elements that have the same binding under the Sales_Quotation and Purchase_Order subforms will bind correctly.  You wont need an XML Schema.
The fiddly bit is that in Designer you can only edit the first top level subform in the form, the second one wont show up at all at design time.  However, the approach was discribed in this blog http://blogs.adobe.com/formfeed/2011/02/multiple-top-level-subforms.html and John has a macro to move the first subform become the last.  I've already run the first macro, NewTopSubform, so you just need the RotateSubforms macro.  There's more information on macros and how to install them in the Designer help http://help.adobe.com/en_US/enterpriseplatform/10.0/DesignerHelp/WS3041177a02dcf48e2f8c933 d12daa5a53a3-8000.html
Good luck
Bruce

Similar Messages

  • Can't hide text field label..only text field

    I'm trying to display text field boxes on a form to fill out when a box is checked.  I'm able to do this for the actual text field, but can't figure out how to hide then show the associated text field label.  Can you tell me what I'm doing wrong?
    Thanks!
    var nHide =
    event.target.isBoxChecked (0) ? display.visible:display,hidden;
    this.getField ("Name").display = nHide; this.getField

    First of all, you're using Acrobat JavaScript in an XFA form, which doesn't work.
    LiveCycle Designer has its own interpretation of JavaScript, which is different to Acrobat.
    There is also a second scripting language called FormCalc available.
    Its syntax is much easier to learn and is matches perfectly to manipulate XFA forms.
    Check the help (F1 button) in Designer to get the Designers scripting guide.

  • All caps in text field

    Hi,
    How can I adjust text field in a form, Name for example, so that all typed letters are capital, no matter how I type them. My browser is Mozilla Firefox, and I use Oracle Database XE 10g. Please, help me if you can.

    A very nice and clear example as always, Denes.
    As an alternative, you can just put the following in the HTML Form element attributes for any item you automatically want to uppercase:
    onChange="this.value=this.value.toUpperCase();"It means you don't need to define a javascript function anywhere else and can use the exact same bit of code regardless of the specific item you are adding this functionality to.
    I tend to use onChange as opposed to onKeyUp because of the following behaviour I noticed when you do it with the onKeyUp event:
    If you type a string (such as "wesday") then realise you've mispelled it, so use the mouse to move your cursor back to just after the "e" to add the required "dne" and then start typing, as soon as you type the first character the cursor will be moved to the end of the word so you'll end up typing wedsdayne
    Andy

  • Paste is only pasting a text field instead of an image copied to the clipboard from another program like mail or safari?

    The latest version of Keynote only pastes a blank text field after copying an image to the clipboard in other applications like mail or Safari.  The previous version worked fine with copying and pasting images.  Saving the image to a file and then inserting the image file is the only work-a-round I have found so far.

    To place an image on a slide, use Finder to drag and drop the file onto the slide.

  • How do I auto populate the date into text fields when form is first opened?

    Hello,
    I read all about the changing the scripts but its not really working for me. I was hoping someone could help me with directions on how to auto populate the date into designated text fields when my adobe document is first opened?
    I am working in Adobe Acrobat 9.
    Thank you,
    Sheri

    When you add a new document JavaScript (Advanced > Document Processing > Document JavaScripts > Script Name (enter something) > Add), you will be given a function skeleton by default. Just delete it and enter the line of code I showed above. Now, whenever the document is opened, the code will get triggered and the field will be updated with the current date. There is no "Document Open" action (at least that's accessible via Acrobat's UI), but this is effectively the same thing since any document-level JavaScripts are executed when the document is opened.

  • How do u make a text field for int only

    Hi I wanted to make the text Field int only
    I.e
    int temp = 0;
    temp = testField.getText();
    Thanks in advance

    Rarna, I think this is what you are asking. This is a bare-bones TextField that only accepts keys that are numeric. I found that the left and right arrows still work. Backspace and delete do not so you would have to add additional case statements and code to handle these if you want to support them. I added a main method to try this out.
    import java.awt.*;
    import java.awt.event.*;
    public class NumericTextField extends TextField implements KeyListener {
       public NumericTextField() {
          super();
          this.initField();
       public NumericTextField(int columns) {
          super(columns);
          this.initField();
       public NumericTextField(String text) {
          super(text);
          this.initField();
       public NumericTextField(String text,int columns) {
          super(text,columns);
          this.initField();
       private void initField() {
          setEditable(false);
          addKeyListener(this);
       public void keyPressed(KeyEvent e) {
          int key=e.getKeyCode();
          switch(key) {
             case KeyEvent.VK_0:
             case KeyEvent.VK_1:
             case KeyEvent.VK_2:
             case KeyEvent.VK_3:
             case KeyEvent.VK_4:
             case KeyEvent.VK_5:
             case KeyEvent.VK_6:
             case KeyEvent.VK_7:
             case KeyEvent.VK_8:
             case KeyEvent.VK_9:
                setText(getText()+e.getKeyChar());
       public void keyReleased(KeyEvent e) {;}
       public void keyTyped(KeyEvent e) {;}
       public static void main(String[] args) {
          Frame f=new Frame();
          NumericTextField ntf=new NumericTextField();
          f.add(ntf);
          f.pack();
          f.setVisible(true);

  • HP LaserJet Pro 400 prints highlighted text fields, instead of turning off highlights

    I have an electronic medical record with highlighted fields which I fill in.  When printing, every other printer only prints the text but not the highlighted background.  Unfortunately, the HP laserjet prints the gray background.  How do I turn that off?

    I have an HP laserjet 4L with a usb adapter connected to the airport via a usb hub, and have had little trouble, except for last night it kept printing 1 partial page over and over. I printed multiple pages at once, I figured the printer just OD'd, after all its an old printer. I have one laptop that uses Vista, and its always giving me grief. Vista

  • How to provide a LINK on normal TEXT field in read only mode

    Hi,
    I have a TEXT item and that is used for only url purpose.
    so a user can enter something like http://www.abc.com in that field.
    So when I am in read only mode for that item, I want a link also on that text..
    how can I do that.
    thanks,
    Deepak

    You could create a pl/sql expression computation on the TEXT item which will convert the value shown for the field to be a HTML link
    '<a href="http:// ' || :PXX_TEXT || '">' || :pXX_TEXT || '</A>';Make the computation conditional using the same condition as is used to render the item as read-only
    varad

  • How to restrict the text field to enter only numbers???

    I have used "onkeyup" event to call a function "test", I am getting the alert message for every entry (even for a number), I dont know why I am getting this. Please help me out.....
    Number1 : <input type="text" name="myin1" id="a" onkeyup="test(this,event)">
    function test(ff,evt)
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :
    ((evt.which) ? evt.which : 0));
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
    alert("Only numbers are allowed"); }
    }

    Hi,
    However this is java forum and you are asking for a solution of a javascript problem,
    I think I got the problem.
    This script works fine when I run it on IE and use the numeric keys above the text keys,
    but give error when I use the numerical keypad on the right.
    I think you should change your if condition like this
    if (charCode > 31 && ((charCode < 48 || charCode > 57) || (charCode < 96 || charCode > 105)) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Make all text fields read only after signing form

    Hello,
    I have a live cycle form which needs to have all of the text fields set as read only after signing.
    The java script has been placed in the post sign event of a digital signature field.
    for(var i=0;i<this.numFields;i++) {
    var cNm = this.getNthFieldName(i);
    if (cNm.type = "text") this.getField(cNm).readonly = true;
    After signing the form the following console error is shown:
    this.getNthFieldName is not a function
    Can anyone please advise how to revise the script so that when the form is signed all of the text fields become ready only?
    Any assistance will be most appreciated.
    Thank you.

    You don't need any JavaScript to do this.
    In Designer you can setup the signature field in that way, that all fields will be locked after signing.
    Look here:
    http://forums.adobe.com/message/3121870?tstart=2

  • Data from one text field to another text field on the next page

    Hi all,
    Hi I have a form, which has data coming in from the data binding, the thing is the data is mapped to a certain text field and if that text field is filled up it should be continued on to the other text field which is on the immediate page following it. the reason for using text field instead of  Subform and make it expandable is  the client does not want to change the position and structure of other fields following that field, they are o.k with the amount overflowed in to the next text field .
    is there any script for the same condition in Java script or form calc.
    Thanks in advance.
    de1209

    This is not as simple as it sounds. You will not be able to split the field up during the time of binding. The entire string must go into the field and only after it has completed the biinding can we change it around. A colleage of mine did this for an interactive field and it involved some pretty complicated code. Here is a link to her blog entry that describes what she did:
    http://blogs.adobe.com/lcdesigner/2008/07/an_example_of_splitting_text_a.html
    But that is only part of the problem.....once you split the information across two fields you will need to recombine it back into a single field so that the data that is submitted can represent it correctly again. So you will have to reverse the process in a presubmission step.
    Make sense?
    paul

  • Linking a class to a dynamic text field to load XML data.

    Hi,
    I'm quite new to ActionScript and would be grateful for any help here.
    I want to load text into a dynamic text field (called 'about_tab') using  a class depending on the language selected (by clicking on a flag icon)  by the user.
    I managed to get this to work when the ActionScript was written directly  in the timeline, but am having problems with doing the same thing via a  class.
    This is my class file:
    package
    import flash.display.SimpleButton;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.events.Event;
    public class ChangeLang extends SimpleButton
    public function ChangeLang()
    addEventListener(MouseEvent.CLICK, switchLang);
    trace("ChangeLang class working");
    public function switchLang(event:MouseEvent):void
    var lang = event.target.name;
    var req:URLRequest = new  URLRequest("languages/"+lang+".xml");
    var loader:URLLoader = new URLLoader();
    var substance:XML;
    function xmlLoaded(event:Event):void
    trace("function xmlLoaded is running");
    substance = new XML(loader.data);
    about_tab.text =  substance.about_lbl;
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    loader.load(req);
    Here's one of my XML files (the other is the same except "About" is  written in German):
    <substance>
    <about_lbl>About</about_lbl>
    </substance>
    When I run it, it returns my trace statements that the class ChangeLang  and the function xmlLoaded are running, but no text appears in the  dynamic text field (I should/want to see the word 'About'). I get this  error message:
    1120: Access of undefined property about_tab
    The problem, I'm guessing, is in the part in red in my code. I think I need to target the text field in the display list by creating a  reference to it. If so, could someonw point out how I do this, or perhaps a tutorial that would help. I've tried adding the word stage (i.e.,stage.about_tab.text =  substance.about_lbl; ) but it still doesn't connect. I guess there's something really simple I'm missing, so I  apologize if this comes across as a stupid question
    Thanks for any help.

    Hello flashrocket!
    I'm also new to AS3 and I've just started using external classes and I think I know what you should do to put your code to work.
    Instead of using the text field you created inside your flash file, why don't you use the "TextField" class to create an instance of this object? It's the exact same thing as when you create and instantiate a new text field inside Flash.
    First, import flash.text.*; (includes classes like TextField, TextFieldAutoSize, TextFormat, TextFormatAlign, etc)
    Than you just have to create a var like
    public var about_tab : TextField;
    or
    public var about_tab : TextField = new TextField();
    then, to adjust the properties of this tab you use dotsyntax as if it where on your stage like:
    about_tab.x = 50; about_tab.alpha = .5; etc...
    you can even create a function to "config your textField"
              private function createAndConfigTextField() : void {
                   about_tab = new TextField(); //you only need this line if you
              // only typed something like "public var about_tab:TextField;
              // if instead you used "public var about_tab:TextField = new TextField(); outside
              // this function, just skip this first line because you already have an instance of
              // text field named "about_tab"...
                            about_tab.autoSize = TextFieldAutoSize.CENTER;
                   about_tab.background = true;
                   about_tab.border = true;
                   var aboutTextFormat : TextFormat = new TextFormat();
                   format.font = "Arial";
                   format.color = 0x000000;
                   format.size = 11;
                   format.bold = true;
                   format.align = TextFormatAlign.CENTER;
                   about_tab.defaultTextFormat = aboutTextFormat;
                   addChild(about_tab);
    This is just an example of what you can do... I hope you get it... let me know if you have any doubt...

  • Auto-tabbing between input text fields in AS3

    Hello-
    I am having some trouble figuring out how to work auto-tabbing between input text fields when a user inputs a character. I have a series of text boxes with maxChar set to 1, and when the user inputs a character, I would like it to auto-tab to the next one. I'm putting together a crossword-style banner ad so the auto-tabbing will help tremendously.  All the input text fields are instanced on the stage as input1, input2, etc; not called in from a custom class.  Also, I've been working with AS3 for about 2 weeks lol!
    thanks!

    Awesome, thank you, that works nicely! Now I need to figure out how to capture individual keyCodes for each input and then come up with a conditional to check for right or wrong answers. I have a "check your answers" button all set up. I think I am almost there, possibly a syntax hiccup for me. Any advice on how to do that would be appreciated.

  • Dropdown filling multiple texts fields

    Completely new to live cycle. I've designed a form that I finally successfully linked with a XML datasheet. I can easily incorporate the texts fields that my sheet is generating. Now what I want to do is turn one of those fields (PRODUCTS) in a dropdown so when the user selects a product, all the other text fields are filled with that line of the datasheet (DATE, PRICE, DESCRIPTION etc...). I have to work with xml cause the database of the products is constantly updated on an excel spreadsheet. I badly need help!
    PS: I succesfully created the dropdown wich links correctly with the XML data, but all the other fileds simply show the first line of the sheet, or multiple lines in the same field...
    Thanks in advance!
    Nicolas

    Paul,
    Thank you so much, that solved my problem (with a little bit of tweaking to your code). I had to pull the Value from the Dropdown List instead of the text because the text is not unqiue in our database.
    One simple question...Is it possible to display more than one field within the Dropdown List? For example, can I place the Company Name and the Contact name at the Company within the Dropdown list? This reason for needing this is that we service customers that have multiple locations and it'd be easier for the Service Techs to pick the correct customer if the Company Name and Contact were in the Dropdown List.
    One last harder question....Is there an easy way to sort the data displayed within the Dropdown list? I do not have the option of selecting "Sort Ascending"...Your insight would be greatly appreciated.
    Thanks again,
    SSCLadam

  • Split imported XML data into multiple text fields

    I should first describe my final project because it is very possible that I am going about this entirely wrong!
    I am trying to create an interactive PDF file which is the floor plan of our office, when you mouse over the office spaces it would popup the info for the person in that office, in fact when you click on the office space it would show additional info like computer MAC and jack numbers
    I placed the floor plan as a layer and them created a second layer with no fill/no stroke rectangles over the offices and made them buttons (office01, office02)
    I then made text fields with the info for the people, one for regular info and one for extra info (office01-data, office01-Xdata) I made these text fields buttons as well and had them "hidden until triggered"
    These info fields are all on top of one another, as in the are all the same size and in teh same location
    Then I went to the office buttons and created events "On Roll Over" "Show/Hide Buttons and Forms" and changed the visibility of the corresponding info button.
    This works like a charm!
    I hope I am clear up to this point.... my problem now is I would like to import this data both regular and extra from an excel spreadsheet or an XML file.
    That way when we get new staff or people move offices or whatever I can update the spreadsheet or XML file, rerun my InDesign file and create a new interactive PDF
    I have created the XML file
    <staffMap>
         <staff>
              <name>John Doe</name>
              <computerName<gfth56df</computerName>
              <phoneMAC>00:08:00:AB:CD:EF</phoneMAC>
         </staff>
    <staff>
              <name>John Smith</name>
              <computerName<gfth06cb</computerName>
              <phoneMAC>00:08:00:11:22:33</phoneMAC>
         </staff>
    </staffMap>
    Created a new InDesign document
    Imported the XML and placed it in a text field
    saved as a template and closed it
    Reopen and import the XML data again... and it brings it all into the text field... wonderful and useful but not what I need.
    Is it possible to import the XML data into separate test fields, or into some other separate field that I can make into a button and show/hide?
    I may end up just entering all the data directly into InDesign as I know this will work, it just does not seem like the right way to do it.
    Thanking you all in advance 

    I am still looking to get some help with this.
    I would love to know if it is not possible or any ideas at all

Maybe you are looking for