Svelte · Middle · Question 37 of 75
How do you call a named action from a form?
<form method="POST" action="?/login">...</form>- ✓Correct answer: Set
action="?/name"; the action is exported asactions.loginin+page.server.js - 2Set
name="login"on the form - 3Use
onsubmit={actions.login}
Explanation
A button can override it with formaction="?/register". A page can't have both a default and named actions.