-
Is it possible to get the order of register order of the fields? I wanted to find some automated way to focus the next field. I'm using react-native. I was hoping to figure out next field then call |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
No, RHF doesn't keep the registered field's order. The only think you can kinda rely on is the order of the form values properties. They're placed in order of registration. But keep in mind, that the order's gonna change as soon as you unregister one of the inputs. |
Beta Was this translation helpful? Give feedback.
-
I am running into a similar issue / problem. I have a situation where I have to externally controlled keyboard events that potentially take focus away from the from. The user has to interact with other elements. However, when the user is done they use want to use the keyboard to bring them back into the form focused on the next input. So understanding form order would be a potential way to solve this problem. |
Beta Was this translation helpful? Give feedback.
-
Im having now a similar requirment were i have a long form in-order to enhance ux i want the focus to shift from one field to the next in the form |
Beta Was this translation helpful? Give feedback.
No, RHF doesn't keep the registered field's order.
The only think you can kinda rely on is the order of the form values properties. They're placed in order of registration. But keep in mind, that the order's gonna change as soon as you unregister one of the inputs.