5 Replies Latest reply: Mar 15, 2012 11:00 AM by theresa_johnson RSS

    Tabbing order in addInstance subforms

    theresa_johnson Community Member

      Hello,

       

      I am trying to set my tabbing order in an addInstance subform. The tabbing works as I expect it to until the user adds an instance of the subform...and then those fields are not addressed until the entire form has been tabbed through.

       

      Does anyone know if there is a way to include these added subforms in the tabbing order either through LiveCycle or with some code?

       

      Thanks so much,

      Theresa

        • 1. Re: Tabbing order in addInstance subforms
          dohanlon Community Member

          Have a look at the Tab Order (Window->Tab Order) which allows you to change tabbing order through the ui. You can script it but its probably alot of work for every field.

          • 2. Re: Tabbing order in addInstance subforms
            theresa_johnson Community Member

            Hi,

             

            I have set my tab order via Window --> Tab Order...however, any added instances of my subform are basically ignored by the tabbing order I set. I've been playing around with scripting the tab order just in those added subforms today, but can't get it quite right. Do you have any thoughts on how I should approach this?

             

            I did a setFocus on the first field of the subform when the subform is initialized, but when I get to the end of my line, the tabbing goes back to the beginning of the form instead of resuming the intended tabbing order.

             

            Thanks for your response!

            • 3. Re: Tabbing order in addInstance subforms
              dohanlon Community Member

              Not sure whats going on with your tab order. Any chance you can post your form somewhere to look at?

              • 4. Re: Tabbing order in addInstance subforms
                dohanlon Community Member

                For some reason Designer 8 has the tab order as references to incorrect next fields (correct if it was static, not for dynamic). For example label_equals on replacement subform is pointing to sqfttotal field in the totals subform, which is why any new instance of the repeating subform added is being skipped. The last focus field Button3 traverses to label_equals then to Text2 and then to sqfttotal. Since the middle 2 are non-fields, they are skipped.

                 

                If you want to see where a field really points too in the source, open the XML Source Tab and click on label_equals in the hierarchy for example, you will see a block of xml which looks like

                 

                <traversal>
                    <traverse ref="Subform1[0].Text2[0]"/>
                </traversal>
                

                 

                Not good. Tried moving the tab order around so that Button3 is the last object in the subform, but the binding stays in Designer 8. In Designer 9, when i move Button3 to be the last object, it correctly removes the tab binding and so fixes the issue. Im thinking that this is a bug at the moment, since i cant see any way through the UI to change the last tab focus of an object to be the correct one (once it has been set).

                 

                However, we can can get around this:

                 

                * Move Button3 in replacement to be the last object in the tab order of the repeating subform

                * When you addInstance of the new Subform, set the intial focus to be the first field

                * on Button3, add the following script to the initialise event to remove the bad tab binding

                 

                this.resolveNode("traversal.#traverse").ref = "";
                

                 

                You dont need Enter / Exit events to set the focus then

                • 5. Re: Tabbing order in addInstance subforms
                  theresa_johnson Community Member

                  You're the best! This workaround is great. Thanks much!