Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all, <a href="https://stackoverflow.com/questions/379610/can-you-nest-html-forms">you can't nest forms</a>.<br> As I understand the idea is to group some elements. If so, then replace the interior <code>&lt;form&gt;</code>tags with <code>&lt;div&gt;</code>s.</p> <p>The other problem is that you want to use the same input elements names through different sections. Basically, if <code>name</code> is not unique, it will get updated with the last occurrence's value. For example:</p> <pre><code>&lt;input type="text" name="a" value="val 1" /&gt; &lt;input type="text" name="a" value="val 2" /&gt; </code></pre> <p>When the above is posted, <code>$_POST['a']</code> will contain <code>val 2</code> value. Even, if the second text-box is hidden. So either you make text-boxes names unique or you disable the ones, which are hidden. <code>disabled</code> attribute will make the control disabled for user input and also not present in <code>$_POST</code> array. So, in this case:</p> <pre><code>&lt;input type="text" name="a" value="val 1" /&gt; &lt;input type="text" name="a" value="val 2" disabled /&gt; </code></pre> <p><code>$_POST['a']</code> will contain <code>val 1</code> value, because the second text-box is disabled.<br> In your case, every time you hide a section you should disable all controls within the group. Here's how to do it: <a href="https://stackoverflow.com/questions/5290525/disable-all-form-elements-inside-div">disable all form elements inside div</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload