
JavaScript free alternatives to HTML forms? - Multicomp
Are there any?<p>I&#x27;m writing a web app using static html. I need to get not too complex input data like text fields and numbers.<p>I plan to use HTML forms to have the web page talk to the API layer and do post redirect get pattern, but should I use an alternative technology like XForms? I have never heard of it in use in my circles but figured I should ask.<p>No js because I want to build my app for the Firefox first, noscript folks and let any JS be just decorative &#x2F; an alternative front end later on down the road.<p>Back end is sqlite, web tech is asp.net<p>Whatever your input is, I want to hear it....thanks for reading.
======
gregjor
HTML forms submit to whatever URL you put in the “action” attribute, which
could be an API endpoint, or code in the same file (a common ASP/PHP pattern),
or another file. You don’t need JS for that. Likewise a redirect is just an
HTTP “Location” header sent to the browser, no JS needed for that, either.

------
Ayesh
I'm convinced a lot of the JS form validation can now be removed in favor of
HTML5 form element attribute.

You can just set the form action URL to your asp endpoint, which will validate
data again, and show the post form on errors, or 302 redirect to the
target/form if valid.

~~~
Multicomp
Yeah this was the plan for me, I just wanted to make sure that I wasn't doing
something in the old boring way when I should do it in the new fun way.

