I’m creating a form using LiveWire.
The gimmick is that is one question, click next and LiveWire pulls next question. Etc…
The problem is autofocus.
On the first question it’s fine, user can type in the answer.
Subsequent questions, autofocus does not work.
Is there a way to trigger autofocus, when LiveWire pulls a new question? I cant see anything in the docs.
<div class="flex max-w-2x1" wire:key="question-{{$input_name}}">
<input wire:model.lazy="{{$input_name}}" type="{{$activequestion->inputtype ?? 'text'}}" autofocus>
</div>