Forms working without JS

As part of my plan to make some important pages of my site work also without JS enables I have made separate pages for the support and contact form where the user is redirected there when JS is disbaled.

And here is the problem:
Suppose that JS is disabled and the user clicks the link to go to the page where the contact form appears.Then he re-enables JS and by clicking the link again the JS popup version of the form appears…at that point two contact forms appear in the page,the JS version and the server side version.

How can I tackle this issue?

Have just one form that works for everyone.


I do not understand your answer given the problem I stated…
The flow which describes the problem is described above.

That flow leads to the result that two forms appear in the screen-one JS based and one PHP based.

Are you familiar with the concept of progressive enhancement?

This is doing it backwards.

The idea is that you first make a form with pure html that is fully functional (in the context of a form there will of course be some back-end, but that’s fine, as it does not assume or rely upon, anything on the client-side). Once you have that working, you then add further “enhancements” such as images and fancy css styling, and further you may want to add some javascript, for things like in-page validation and suchlike.
But it seems you may have overcomplicated things by doing this the other way around.
Take it back to basics, then add the flourishes.

1 Like

I do not think you understand my problem.I am not misjudging you here but just telling things how they are.

Presumably by this you mean that your other pages are viewable with JS disabled, but interaction isn’t possible. Is that correct?

Like @SamA74, I’m finding it hard to see why you need two separate forms here. Why not send everyone to the none-JS version, and use JS to enhance it (if you wish) for those who have JS enabled?

If I’m missing something here, perhaps you could explain in more detail what it is.


If you prefer “graceful degradation” over “progressive enhancement” that’s your choice.

But I agree with the others, having one form will make work maintaining it much easier.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.