Nothing fancy, just a html helper I keep re-writing.
Form that works without JS, progressively enhanced.
<form action="/signup" method="post" data-enhance>
<label>
<span>Email</span>
<input type="email" name="email" required autocomplete="email" />
</label>
<label>
<span>Password</span>
<input type="password" name="password" required minlength="12" autocomplete="new-password" />
</label>
<button type="submit">Create account</button>
</form>
Form that works without JS, progressively enhanced.
<form action="/signup" method="post" data-enhance>
<label>
<span>Email</span>
<input type="email" name="email" required autocomplete="email" />
</label>
<label>
<span>Password</span>
<input type="password" name="password" required minlength="12" autocomplete="new-password" />
</label>
<button type="submit">Create account</button>
</form>
No tests yet; PRs in the form of forks welcome.
Developer Discussions