{"id":869,"date":"2026-11-21T15:00:02","date_gmt":"2026-11-21T15:00:02","guid":{"rendered":"https:\/\/html-editor-online.com\/blog?p=869"},"modified":"2026-11-21T15:00:03","modified_gmt":"2026-11-21T15:00:03","slug":"html-form-not-submitting-sandboxed-preview","status":"publish","type":"post","link":"https:\/\/html-editor-online.com\/blog\/html-form-not-submitting-sandboxed-preview\/","title":{"rendered":"HTML Form Not Submitting Sandboxed Preview: Why and What to Test"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you searched for \u201cHTML form not submitting sandboxed preview\u201d, the short answer is that the live preview in the <a href=\"https:\/\/html-editor-online.com\/editors\/html\" title=\"HTML Code Editor\">HTML Code Editor<\/a> renders your form controls but does not permit form submission. A submit button that does nothing there is expected behavior. It does not show that your <code>action<\/code> URL is wrong or that your server handler is broken. The input is HTML form markup, the output is a rendered set of controls, and the useful checks are split in two: what you can judge visually in the preview, and what needs a deployed page with a real endpoint. The sections below separate the two and give you a checklist for each.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li class=\"\"><a href=\"#html-form-not-submitting-sandboxed-preview-the-short-answer-1\">HTML Form Not Submitting Sandboxed Preview: The Short Answer<\/a><\/li><li class=\"\"><a href=\"#rendering-is-not-submitting-what-the-preview-does-and-does-not-prove-2\">Rendering Is Not Submitting: What the Preview Does and Does Not Prove<\/a><\/li><li class=\"\"><a href=\"#html-form-not-submitting-sandboxed-preview-checks-that-still-work-3\">HTML Form Not Submitting Sandboxed Preview: Checks That Still Work<\/a><\/li><li class=\"\"><a href=\"#a-minimal-form-to-adapt-then-test-after-deployment-4\">A Minimal Form to Adapt, Then Test After Deployment<\/a><\/li><li class=\"\"><a href=\"#what-to-check-on-a-deployed-page-5\">What to Check on a Deployed Page<\/a><\/li><li class=\"\"><a href=\"#html-form-not-submitting-sandboxed-preview-or-deployed-page-which-is-it-6\">HTML Form Not Submitting Sandboxed Preview or Deployed Page: Which Is It?<\/a><\/li><li class=\"\"><a href=\"#frequently-asked-questions\">Frequently asked questions<\/a><\/li><li class=\"\"><a href=\"#next-steps\">Next steps<\/a><\/li><li class=\"\"><a href=\"#sources\">Sources and further reading<\/a><\/li><\/ul><\/nav><\/div>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-1-816-1-7dbff7e3b9824d3e-1024x576.jpg\" alt=\"Abstract form controls displayed inside a closed glass case, representing a sandboxed preview that shows a form but blocks submission\" class=\"wp-image-873\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-1-816-1-7dbff7e3b9824d3e-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-1-816-1-7dbff7e3b9824d3e-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-1-816-1-7dbff7e3b9824d3e-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-1-816-1-7dbff7e3b9824d3e.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"html-form-not-submitting-sandboxed-preview-the-short-answer-1\">HTML Form Not Submitting Sandboxed Preview: The Short Answer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The HTML Code Editor renders form controls in its live preview, but the preview runs in a sandboxed iframe that does not permit form submission. The product page documents this limit. When you press a submit button there and nothing happens, the editor is behaving as designed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That has one important consequence. A silent button in the preview is not evidence that your <code>action<\/code> URL is wrong, that your server handler is broken, or that your markup has a bug. The preview cannot answer those questions, because the request is never made.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The mechanism comes from the HTML standard. A sandboxed iframe gets a forms sandboxing flag that blocks submission unless the <code>sandbox<\/code> attribute includes <code>allow-forms<\/code>. The <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/browsers.html\" title=\"HTML Standard\" target=\"_blank\" rel=\"noopener\">WHATWG HTML Standard<\/a> defines that flag, and the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/iframe\" title=\"HTML inline frame element - HTML | MDN\" target=\"_blank\" rel=\"noopener\">MDN reference for the iframe element<\/a> lists the sandbox values. Permission to run scripts is a separate value, so a sandbox can allow one and block the other.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I do not suggest trying to change the editor&#8217;s sandbox. That is not a reader-side fix. Instead, sort your checks into two groups: what the preview can show you, and what only a deployed page can show you.<\/p>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-2-816-2-9453b11cf1b45297-1024x576.jpg\" alt=\"Two stations separated by a closed gate, one showing a form blueprint and the other a server, illustrating rendering versus submitting\" class=\"wp-image-875\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-2-816-2-9453b11cf1b45297-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-2-816-2-9453b11cf1b45297-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-2-816-2-9453b11cf1b45297-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-2-816-2-9453b11cf1b45297.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"rendering-is-not-submitting-what-the-preview-does-and-does-not-prove-2\">Rendering Is Not Submitting: What the Preview Does and Does Not Prove<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Rendering means the browser parses your markup and draws the controls: labels, text fields, a select, a button. Submitting is a different job. The browser collects the values of the form&#8217;s named controls, builds a request from the effective <code>action<\/code> and <code>method<\/code>, sends it, and then navigates to the response. The preview covers the first job, and the sandbox blocks the second.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It helps to keep several kinds of checking apart, because a good-looking result can tempt you to assume more than it proves:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Visual layout<\/strong>: do the controls, labels, spacing and button text look right? The preview shows this.<\/li>\n\n\n\n<li><strong>Markup correctness<\/strong>: are ids unique, do <code>for<\/code> attributes match, do controls have names? The HTML Code Editor has no validator or linter, so you confirm these by reading the code.<\/li>\n\n\n\n<li><strong>Submission<\/strong>: does a request leave the page with the right data? Only a deployed page can show this.<\/li>\n\n\n\n<li><strong>Server handling<\/strong>: does the endpoint accept, validate and store the data? Only the real endpoint can show this.<\/li>\n\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Scripts add one more wrinkle. Script permission is separate from form permission, so a preview that runs your JavaScript tells you nothing about whether a form can submit. If you also want to write Markdown, preview HTML and test scripts, the <a href=\"https:\/\/html-editor-online.com\/blog\/markdown-javascript-editor-browser\/\" title=\"Markdown JavaScript Editor in the Browser: Write Markdown, Preview HTML and Test Scripts\">Markdown JavaScript editor guide<\/a> is a separate read on that topic. The same caution applies to any preview: a working script does not prove the submission path works.<\/p>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6b02047c323d4&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6b02047c323d4\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-3-816-3-093dc64ec0679e60-1024x576.jpg\" alt=\"Magnifying glass over abstract form fields linked to their labels, illustrating the visual and label checks available in the preview\" class=\"wp-image-877\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-3-816-3-093dc64ec0679e60-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-3-816-3-093dc64ec0679e60-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-3-816-3-093dc64ec0679e60-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/html-form-not-submitting-sandboxed-preview-image-3-816-3-093dc64ec0679e60.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"html-form-not-submitting-sandboxed-preview-checks-that-still-work-3\">HTML Form Not Submitting Sandboxed Preview: Checks That Still Work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Even with submission blocked, the preview is useful for the visual and structural side of a form. Work through this list while you edit:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check that labels, fields, button text, spacing and layout appear as you intended.<\/li>\n\n\n\n<li>Type into each field and confirm it accepts input.<\/li>\n\n\n\n<li>Press <kbd>Tab<\/kbd> and confirm each control can receive focus in a sensible order.<\/li>\n\n\n\n<li>Click each label and confirm focus moves to its field. If it does not, the label is probably not associated with the control.<\/li>\n\n\n\n<li>Read the markup and confirm that every explicit label&#8217;s <code>for<\/code> value matches the <code>id<\/code> of exactly one control.<\/li>\n\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The label checks matter because association gives a control its accessible name and makes the label clickable. The <a href=\"https:\/\/www.w3.org\/WAI\/tutorials\/forms\/labels\/\" title=\"Labeling Controls | Web Accessibility Initiative (WAI) | W3C\" target=\"_blank\" rel=\"noopener\">W3C WAI tutorial on labeling controls<\/a> recommends properly associated labels, and the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/label\" title=\"HTML label element - HTML | MDN\" target=\"_blank\" rel=\"noopener\">MDN label element reference<\/a> describes the explicit <code>for<\/code> and <code>id<\/code> pairing as well as nesting a control inside its label.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A clean preview does not prove the markup is valid. A duplicate id or a misspelled attribute can slip through while the page still looks fine. If spacing and layout need work, you can <a href=\"https:\/\/html-editor-online.com\/blog\/visual-css-editor-browser-live-preview\/\" title=\"Visual CSS Editor in the Browser: Style With a Live Preview and Know Its Limits\">style with a live preview and know its limits<\/a> using the CSS guide on this site. The <a href=\"https:\/\/html-editor-online.com\/tools\/html_beautifier\" title=\"HTML Beautifier\">HTML Beautifier<\/a> can also re-indent messy markup so mismatched tags and ids are easier to spot. Beautifying only changes the layout of the source; it does not repair invalid code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"a-minimal-form-to-adapt-then-test-after-deployment-4\">A Minimal Form to Adapt, Then Test After Deployment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a small contact form you can paste into the editor to inspect fields and layout. The route <code>\/contact<\/code> is an illustrative path, not a working endpoint supplied by the editor. Replace it with a route that exists in your own environment. The HTML Code Editor has no validator, so confirm ids, names and attributes by reading the code yourself.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;form action=&quot;\/contact&quot; method=&quot;post&quot;&gt;\n  &lt;p&gt;\n    &lt;label for=&quot;name&quot;&gt;Name&lt;\/label&gt;\n    &lt;input id=&quot;name&quot; name=&quot;name&quot; type=&quot;text&quot; required&gt;\n  &lt;\/p&gt;\n  &lt;p&gt;\n    &lt;label for=&quot;email&quot;&gt;Email&lt;\/label&gt;\n    &lt;input id=&quot;email&quot; name=&quot;email&quot; type=&quot;email&quot; required&gt;\n  &lt;\/p&gt;\n  &lt;p&gt;\n    &lt;label for=&quot;message&quot;&gt;Message&lt;\/label&gt;\n    &lt;textarea id=&quot;message&quot; name=&quot;message&quot; rows=&quot;4&quot; required&gt;&lt;\/textarea&gt;\n  &lt;\/p&gt;\n  &lt;button type=&quot;submit&quot;&gt;Send&lt;\/button&gt;\n&lt;\/form&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the preview you can look at the three fields, type into them, and click each label to confirm focus moves. Clicking the button will not submit anything, and that is expected. Notice the details that matter later: each label&#8217;s <code>for<\/code> matches a unique <code>id<\/code>, each control has a <code>name<\/code> so its value can be included in a request, the button has <code>type=\"submit\"<\/code>, and the method is <code>post<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The POST request and the server handling must be tested where <code>\/contact<\/code> really exists. I would not assume that opening a local file or pointing at an arbitrary URL gives you an equivalent test. Relative actions resolve against the address of the page that contains the form, and the receiving server decides what happens next.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-to-check-on-a-deployed-page-5\">What to Check on a Deployed Page<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Deploy the page to the environment you intend to use, point the form at a real endpoint you control, and use non-sensitive test data such as a made-up name and an example address. Then work through this order:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Confirm the submit control belongs to the intended form, either by sitting inside it or by using a <code>form<\/code> attribute that names the form&#8217;s id.<\/li>\n\n\n\n<li>Confirm the control is <code>type=\"submit\"<\/code> and not <code>type=\"button\"<\/code>. The <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/button\" title=\"HTML button element - HTML | MDN\" target=\"_blank\" rel=\"noopener\">MDN button reference<\/a> explains that a button inside a form submits by default, while a button typed as <code>button<\/code> does nothing on its own.<\/li>\n\n\n\n<li>Confirm every value you need has a <code>name<\/code>. A control without one is not included in the submission.<\/li>\n\n\n\n<li>Check the effective <code>action<\/code> and <code>method<\/code>, including any <code>formaction<\/code> or <code>formmethod<\/code> on the submit button that overrides the form&#8217;s own values.<\/li>\n\n\n\n<li>Fill the required fields with valid values and submit.<\/li>\n\n\n\n<li>Inspect the request, the response and the intended server-side result, for example with your browser&#8217;s developer tools and your server logs.<\/li>\n\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">GET normally puts the form data in the URL, while POST sends it in the request body. The MDN guide to <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn_web_development\/Extensions\/Forms\/Sending_and_retrieving_form_data\" title=\"Sending form data - Learn web development | MDN\" target=\"_blank\" rel=\"noopener\">sending and retrieving form data<\/a> walks through both. If your action is a relative path, the guide to <a href=\"https:\/\/html-editor-online.com\/blog\/import-html-file-images-and-relative-links-broken\/\" title=\"Import HTML File Images and Relative Links Broken: Why Paths Fail and How to Fix Them\">broken images and relative links after an HTML file import<\/a> explains why relative paths can resolve differently depending on where a page is served.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your handler is written in PHP, the <a href=\"https:\/\/html-editor-online.com\/editors\/php\" title=\"PHP Editor\">PHP Editor<\/a> lets you write source and download a <code>.php<\/code> file, but it does not execute PHP. The handler still has to run on a server you control, and it must validate input itself.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"html-form-not-submitting-sandboxed-preview-or-deployed-page-which-is-it-6\">HTML Form Not Submitting Sandboxed Preview or Deployed Page: Which Is It?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If a form still fails after deployment, the preview limit is no longer the explanation. Use the symptom to decide where to look:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Symptom<\/th><th>Likely cause<\/th><th>What to check<\/th><\/tr><\/thead><tbody><tr><td>Nothing happens in the editor preview<\/td><td>The sandbox does not permit form submission<\/td><td>Check layout and labels there, then test on a deployed page<\/td><\/tr><tr><td>Deployed page sends no request<\/td><td>Constraint validation, wrong button type, a button outside the form, or script that cancels the submit event<\/td><td>Look for validation messages, the button type, form association and submit handlers<\/td><\/tr><tr><td>Request sent but data is missing<\/td><td>Controls without a <code>name<\/code><\/td><td>Inspect the request payload<\/td><\/tr><tr><td>Request goes to the wrong place or method<\/td><td>A <code>formaction<\/code> or <code>formmethod<\/code> override, or a wrong <code>action<\/code><\/td><td>Inspect the effective action and method<\/td><\/tr><tr><td>Request sent but the server rejects it<\/td><td>Endpoint, handler or server-side validation<\/td><td>Read the response and server logs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">These are the markup patterns behind the middle rows:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!-- Nothing happens on click: a button typed as button does not submit --&gt;\n&lt;button type=&quot;button&quot;&gt;Send&lt;\/button&gt;\n\n&lt;!-- Not included in the request: no name attribute --&gt;\n&lt;input id=&quot;phone&quot; type=&quot;tel&quot;&gt;\n\n&lt;!-- Overrides the form&#039;s action and method --&gt;\n&lt;button type=&quot;submit&quot; formaction=&quot;\/other&quot; formmethod=&quot;get&quot;&gt;Send&lt;\/button&gt;\n\n&lt;!-- Belongs to a form elsewhere on the page --&gt;\n&lt;button type=&quot;submit&quot; form=&quot;contact-form&quot;&gt;Send&lt;\/button&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Client-side constraint validation can stop a submission before any request is sent, for example when a required field is empty or an email field holds an invalid value. The <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Guides\/Constraint_validation\" title=\"Using HTML form validation and the Constraint Validation API - HTML | MDN\" target=\"_blank\" rel=\"noopener\">MDN guide to form validation<\/a> describes how it works. It improves the experience, but it does not replace validation on the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two distinctions are worth remembering. A visible button is not proof of a successful request, and a valid-looking form is not proof of server acceptance. Each needs its own check where the real page and endpoint live.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"frequently-asked-questions\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-1\">Does a form that will not submit in the preview mean my action URL is wrong?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The editor&#8217;s sandboxed preview does not permit form submission, so no request is made whatever the action says. The preview cannot tell you whether the URL, the method or the server handler is correct. Test those on a deployed page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-2\">Can I make the preview submit by changing the sandbox?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I do not recommend trying. The sandbox is part of how the editor keeps previewed code contained, and changing it is not a reader-side fix. The standards describe an allow-forms sandbox value, but the practical route is to test submission on a page you host.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-3\">Why does clicking a label not focus its field in the preview?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The label is probably not associated with the control. Check that the label&#8217;s for value matches the id of exactly one control, or that the control is nested inside the label. Duplicate or misspelled ids are common causes, and the editor does not validate markup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-4\">If scripts run in the preview, why can the form still not submit?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Script permission and form permission are separate sandbox permissions. A running script shows only that scripts are allowed. Form submission is governed by its own flag, so I would not use a working script as evidence that a form can submit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-5\">My deployed form still sends nothing. What should I check?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check constraint validation messages, whether the button is type submit rather than button, whether the button belongs to the form, and whether JavaScript cancels the submit event. Then confirm the configured action and any formaction override on the button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-6\">What is the difference between GET and POST for a form?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">GET normally places the form data in the URL, while POST sends it in the request body. The effective method comes from the form&#8217;s method attribute unless a submit button overrides it with formmethod. Choose based on what the endpoint expects.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-7\">Does client-side validation replace server-side checks?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Constraint validation can stop a bad submission early and helps users, but it runs in the browser and can be bypassed. The server must validate and handle the data itself, which is another reason to test the real endpoint.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"next-steps\">Next steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An HTML form not submitting sandboxed preview is a documented limit of the editor, not a verdict on your action URL or your server. Use the preview for what it does well: labels, fields, button text, spacing, focus and label association. Then treat submission as a separate test on a deployed page, with a real endpoint you control and non-sensitive test data. Your next step is to paste your form into the editor, work through the visual checklist, and then deploy it and inspect the actual request and response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Related tools and resources on HTML Editor Online:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/html-editor-online.com\/editors\/html\">HTML Code Editor<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/blog\/markdown-javascript-editor-browser\/\">Markdown JavaScript Editor in the Browser: Write Markdown, Preview HTML and Test Scripts<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/blog\/visual-css-editor-browser-live-preview\/\">Visual CSS Editor in the Browser: Style With a Live Preview and Know Its Limits<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/blog\/import-html-file-images-and-relative-links-broken\/\">Import HTML File Images and Relative Links Broken: Why Paths Fail and How to Fix Them<\/a><\/li>\n\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sources\">Sources and further reading<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/html-editor-online.com\/editors\/html\">HTML Code Editor<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/iframe\" target=\"_blank\" rel=\"noopener\">HTML inline frame element &#8211; HTML | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/browsers.html\" target=\"_blank\" rel=\"noopener\">HTML Standard<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/label\" target=\"_blank\" rel=\"noopener\">HTML label element &#8211; HTML | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/form\" target=\"_blank\" rel=\"noopener\">HTML form element &#8211; HTML | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Guides\/Constraint_validation\" target=\"_blank\" rel=\"noopener\">Using HTML form validation and the Constraint Validation API &#8211; HTML | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn_web_development\/Extensions\/Forms\/Sending_and_retrieving_form_data\" target=\"_blank\" rel=\"noopener\">Sending form data &#8211; Learn web development | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Attributes\/form\" target=\"_blank\" rel=\"noopener\">form HTML attribute &#8211; HTML | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.w3.org\/WAI\/tutorials\/forms\/labels\/\" target=\"_blank\" rel=\"noopener\">Labeling Controls | Web Accessibility Initiative (WAI) | W3C<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/button\" target=\"_blank\" rel=\"noopener\">HTML button element &#8211; HTML | MDN<\/a><\/li>\n\n\n<\/ul>\n\n\n","protected":false},"excerpt":{"rendered":"<p>HTML form not submitting sandboxed preview? Learn why the editor blocks submission and what to test visually versus on a deployed page.<\/p>\n","protected":false},"author":1,"featured_media":872,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[277,278,276,116,275,262,269],"class_list":["post-869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html-editor","tag-form-debugging","tag-form-labels","tag-form-submission","tag-html-code-editor","tag-html-forms","tag-live-preview","tag-sandboxed-iframe"],"_links":{"self":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/comments?post=869"}],"version-history":[{"count":5,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/869\/revisions"}],"predecessor-version":[{"id":878,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/869\/revisions\/878"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/media\/872"}],"wp:attachment":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/media?parent=869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/categories?post=869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/tags?post=869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}