Prepared with AI assistance by Design Den Solutions' own audit workflow, with no human edit before publication. The cover image is AI-generated; the official company logo is composited unchanged. Every number below was measured on our own live website on 19 November 2026 — this is our audit of our own code, not a benchmark of anyone else's.
Most of the advice about "contact form not working" reports ends with a screenshot of a console error. That framing hides the actual structural problem, which is much older and much quieter: the form is a JavaScript component, and there is no non-JavaScript path at all. We went looking for it on our own site and found that we had built exactly that.
What we measured
We fetched every HTML page on www.designdensolutions.com (21 pages, all HTTP 200) and counted form attributes rather than guessing:
| Measurement | Result |
|---|---|
| Live HTML pages fetched | 21 (all 200) |
<form> instances found |
22 (one per page; contact.html carries two) |
Forms with an action attribute |
0 |
Forms with a method attribute |
0 |
<noscript> elements anywhere on the site |
3 |
Pages whose <noscript> tells a visitor how to enquire |
1 |
Phone fields split into select[name=phone_code] + input[type=tel][name=phone]
|
22 |
Uses of autocomplete="tel-country-code" or tel-national
|
0 |
The submission path lives entirely in js/interactions.js:
document.querySelectorAll('form[data-contact-form]').forEach(function (form) {
form.addEventListener('submit', function (e) {
e.preventDefault(); // the non-JS path ends here
// ...validate, solve the JS-rendered captcha...
var controller = new AbortController();
var timeout = setTimeout(function () { controller.abort(); }, 25000);
window.fetch('api/contact.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
signal: controller.signal,
body: JSON.stringify({ form_type, name, phone, email, service, company, budget, message, captcha_question, captcha_answer })
});
});
});
Two things fall out of that snippet that the HTML alone won't tell you. First, the endpoint URL — api/contact.php — appears only inside a script, as a relative string. It is not in the markup, so no crawler, no no-JS browser, no form-recovery tool and no password manager can see where an enquiry is going. Second, e.preventDefault() is the first statement in the handler, which means the markup's own submission behaviour is discarded before anything else happens. On its own that's a perfectly reasonable enhancement pattern — if there were something to enhance.
What the browser actually does without JavaScript
This part isn't speculation, it's the spec: when method is absent the submission method is GET, and when action is absent the submission URL is the document's base URL. So with JavaScript switched off, pressing our "Submit Request" button performs:
GET /index.html?name=...&phone=...&email=...&service=...&message=...&captcha_question=...&captcha_answer=...
We simulated it with a plain GET carrying benign values and enquiry-shaped parameters. The server answered HTTP 200 with 104,674 bytes — the ordinary homepage. No error, no acknowledgement, no lead. From the visitor's side the page just reloads. And the text they typed is now sitting in the address bar, which means it is in their browser history and in whatever request log the host keeps.
That is the failure mode worth designing for, because it is silent. A red validation message is a bad experience you can see. A reload that looks like nothing happened is a lost enquiry nobody will ever report to you.
The one-line fix that doesn't work here
The obvious repair is to stop treating the markup as decoration:
<form method="post" action="/api/contact.php" data-contact-form>
We did not ship it, because we tested the endpoint first — and on our host that attribute would have been a lie. A plain request to /api/contact.php returns:
HTTP/1.1 409 Conflict
Content-Type: text/html; charset=iso-8859-1
Content-Length: 83
<script>document.cookie = "..."; document.location.reload(true)</script>
That is bot-challenge middleware running before PHP. It answers an HTML interstitial with a 409 to a path our own client code expects to return JSON. Our production handler already has to cope with it: it matches the interstitial with a regex, sets the cookie the script asked for, and retries once — with a comment in the source saying never to execute the returned HTML. So a native form POST would receive that same 83-byte script, "succeed" at the HTTP level in the browser's eyes, and render a reload instead of a thank-you message.
The lesson generalises: action and method are a promise about a server endpoint, and the endpoint has to be tested independently of the front end. Verify with a plain curl POST that returns your JSON, not with a browser session that already has the challenge cookie set.
What we are actually changing, in order
- Decide the product question before the technical one. Does this form need to submit without JavaScript? For an agency enquiry route, often the honest answer is no — but then the fallback has to be visible, not implied.
-
Ship the fallback we already proved works.
contact.htmlcarries<noscript><p>To enquire, <a href="tel:+919872190965">call +91 98721 90965</a> or <a href="mailto:hello@designdensolutions.com">email us</a>.</p></noscript>. Twenty other pages carry the same form and no such notice. That is a copy-paste job, not a redesign. -
Only then, if real no-JS submission is wanted: exempt the endpoint from the challenge layer, accept
application/x-www-form-urlencodedincontact.php, and addmethod="post" action="/api/contact.php". Re-test withcurlbefore touching the HTML. -
Keep
preventDefault()as an enhancement, which is what it should have been from the start. - Fix the phone autofill tokens (below).
-
Make the anti-spam check survive no-JS. Ours is an arithmetic question rendered into the HTML with the answer key held in a hidden input that JavaScript fills in. With JS off, the hidden value is empty and the visible question is static markup — so even a working
actionwould fail validation.
The small autofill thing that is entirely our own fault
All 22 forms split the phone number into a country-code <select> and a national-number <input type="tel">. Across the site we ship exactly four autocomplete tokens, 22 of each: name, tel, email, off.
The autocomplete="tel" sits on the field that only accepts the national number, while the country-code select carries no token at all. The spec already has the right vocabulary for this exact pattern — tel-country-code for the select, tel-national for the input — and tel means "the whole number", which is not what the field holds. We declared a full telephone number on a partial field, 22 times. We have not tested how individual browsers respond to that mismatch; the claim here is only that the markup promises something it does not accept.
Run this on your own site
Read-only, no submission, about ten minutes:
// Paste into the console on any page with a form.
[...document.querySelectorAll('form')].map(f => ({
id: f.id || f.className.slice(0, 30),
action: f.getAttribute('action'), // null = submits to the document URL
method: f.getAttribute('method'), // null = GET
handled: !!f.querySelector('[data-contact-form], [data-form-error]') ||
getComputedStyle(f).display === 'block'
}));
// Then, separately, prove the endpoint exists and answers in JSON:
// curl -i -X POST https://yoursite/api/your-endpoint
// If that returns HTML, or a 4xx with a script body, the action attribute
// would not have fixed anything.
And grep your noscript blocks: if the only page that tells a JavaScript-disabled visitor what to do is your /contact page, the other pages have a dead button and no notice.
What we are not claiming
- We did not submit a test enquiry. Doing so would have put a fake lead into a real inbox; every endpoint claim here comes from an unauthenticated GET/POST that carried no enquiry data.
- We have no measurement of how many enquiries actually arrive with JavaScript unavailable. That analytics is not configured, so we are not going to invent a percentage.
- We did not test autofill behaviour across browsers or operating systems.
- The 409 interstitial is what our host returns to a plain request today; it is an observation about our configuration, not a claim about that product's defaults.
- Nothing here proves our form is broken for the 99%+ of visitors who run JavaScript. It is the fallback that is missing, not the happy path.
The page this work belongs to is our website development service — https://www.designdensolutions.com/web-development.html?utm_source=devto&utm_medium=referral&utm_campaign=enquiry_form_nojs_fallback — and to be explicit about it: that is a link to our own service page on our own website, placed by us on our own account. It is not third-party coverage or an endorsement of anything.
Design Den Solutions · Mohali, Punjab · +91 98721 90965 · www.designdensolutions.com

Top comments (0)