How can we focus on an input from within a script? #812
Replies: 3 comments 1 reply
-
For now FormKit doesn't have any way to get the input element, but you can still use JS |
Beta Was this translation helpful? Give feedback.
-
It'd be great to have the ability to define on form level which field should auto-focus, if any. The result should be the same as with: const email = ref<HTMLInputElement | null>(null)
useFocus(email, { initialValue: true }) |
Beta Was this translation helpful? Give feedback.
-
Internally I would guess |
Beta Was this translation helpful? Give feedback.
-
I need to focus on an
<FormKit type="text" />
from within a<script setup>
block and amethod
I would appreciate it if you could guide me.
Beta Was this translation helpful? Give feedback.
All reactions