Tl, Dr; I want to toggle and submit <input type="checkbox" /> without <button type="submit">
In ReactJS with enabled JavaScript, I can toggle and submit form with onChange. There is no need to use <button type="submit">
const toggleStatus = () => {/*...*/};
return (
<Form>
<input type="checkbox" role="switch" id="switch" checked onChange={toggleStatus} />
<label for="switch">Activate/Deactivate</label>
</Form>
)
If I want to use toggle but with disabling JavaScript. Is there any method to submit formData since JavaScript is disabled?
It doesn't make sense when user toggles and has to submit form again. (User Experience)
P.S. I've been thinking about using <button> instead of <input type="checkbox" /> as a toggle switch but I'm not sure.