1
0
-1

Hello,

I have a button which makes a Text field appear. When this button is clicked, I want both the text field to appear and the cursor to appear in that text field so the user can immediately begin typing input. How can I do this?


Thank you

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi William,

      You can use the Scroll API namespace/function. I did it with a Button group (only 1 button in the group) with the following on the click event. Had a "Show if" rule in the text field base on the selected value of the button group

      Scroll.scrollTo("textField", true, 50);

      1. Will Pierson

        Hello Gary, Thanks for the quick reply

        This is close, but I should have mentioned these fields are inside of a repeating section, which i think is causing an error where the scrollTo function does not know which item to bind to. My error is now "TypeError: Cannot read property 'top' of undefined"

      CommentAdd your comment...