Strange Behavior on <form action={}>
Unanswered
Alligator mississippiensis posted this in #help-forum
Alligator mississippiensisOP
I am encountering some strange behavior when using action on a form. I have a select within the form that has a default value that gets set. This works fine when the form first loads. However, as soon as the from action fires, it sets the selected value to the first option in the select. This happens even when the function the action calls is completely empty. This does not happen when using the onSubmit option.
Any thoughts?
Any thoughts?
1 Reply
can you share both files, the page/component and the server action/route handler (just to make it easier to pinpoint issue as im thinking it could be submitting too much and your getting first elem)