Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUDI-6580] Autofocus Input - Add setting to form block/form to autofocus on page open #9699

Closed
melohagan opened this issue Feb 15, 2023 Discussed in #9652 · 7 comments
Closed
Labels

Comments

@melohagan
Copy link
Collaborator

melohagan commented Feb 15, 2023

Discussed in #9652

Originally posted by Hystarea February 10, 2023
I am looking for a way to autofocus a text field input when a page is loaded. The purpose of this is to make searching an internal Budibase db quicker.

BUDI-6580

@melohagan melohagan added the enhancement New feature or request label Feb 15, 2023
@melohagan melohagan changed the title Autofocus Input [BUDI-6580] Autofocus Input Feb 15, 2023
@melohagan melohagan changed the title [BUDI-6580] Autofocus Input [BUDI-6580] Autofocus Input - Add setting to form block to autofocus on page open May 23, 2023
@melohagan melohagan added the avalanche OSS team label May 23, 2023
@melohagan melohagan changed the title [BUDI-6580] Autofocus Input - Add setting to form block to autofocus on page open [BUDI-6580] Autofocus Input - Add setting to form block/form to autofocus on page open May 23, 2023
@SaunakNandi
Copy link

@shogunpurple @melohagan Guys i am a newbie, so can u tell me how to set up this project after performing a git clone?

@EmCmEdT
Copy link

EmCmEdT commented Oct 28, 2024

I too would like to do this. Helps the flow if you have to input the form multiple times in a day like logging time tickets, units shipped, problems/issues, etc.

@melohagan
Copy link
Collaborator Author

Hey @EmCmEdT This should be possible with the Scroll To Field action: https://docs.budibase.com/docs/form-actions#scroll-to-field

@EmCmEdT
Copy link

EmCmEdT commented Oct 29, 2024

@melohagan I meant the field is active for typing as if you mouse clicked into that field.
Our users have a touchscreen and a handheld barcode scanner. The easiest workflow would be if they didn't have to tap the input field and could just start scanning things. They have to fill out this form several times a day, and it is awkward for the user to have the scanner in one hand
While having to tap the screen in the other when they also could be holding their badge or the paperwork. It's not a cozy atmosphere... not a lot of places to put things and have them ready, And adding any form to the workflow is already frustrating. I don't wanna add to that frustration.

@melohagan
Copy link
Collaborator Author

@EmCmEdT when the scroll to field action is used, it will also auto focus that field for you to start typing, at least for text inputs.

The barcode scanner input may work a bit differently.

@EmCmEdT
Copy link

EmCmEdT commented Oct 29, 2024

Thank you, @melohagan . How would I do this on page load? It doesn't seem to be working when adding the action to the "Screen" on screen load actions, so I assumed the function only scrolled, given how short my form was. However, I just tried a resize, and I realize it didn't work at all. Perhaps you can't snap to a field if it isn't loaded yet?

@melohagan
Copy link
Collaborator Author

Hey @EmCmEdT It may not be possible on page load, perhaps the form fields haven't loaded yet before the action triggers.

What I have done in the past is add it to a multi-step form. When you click the "Next step" button, the fields will have loaded by that point and will scroll into focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants