Note that there are some explanatory texts on larger screens.

plurals
  1. POUnexpected entry in a <select> field! How did this happen?
    primarykey
    data
    text
    <p>In one of the forms on my website, I have a <code>&lt;select&gt;</code> field like this:</p> <pre><code>&lt;select name="doorno" required&gt; &lt;option&gt;&lt;/option&gt; &lt;option&gt;01&lt;/option&gt; &lt;option&gt;02&lt;/option&gt; &lt;option&gt;03&lt;/option&gt; &lt;option&gt;04&lt;/option&gt; &lt;option&gt;05&lt;/option&gt; &lt;option&gt;06&lt;/option&gt; &lt;option&gt;07&lt;/option&gt; &lt;option&gt;08&lt;/option&gt; &lt;option&gt;09&lt;/option&gt; &lt;option&gt;10&lt;/option&gt; &lt;option&gt;11&lt;/option&gt; &lt;option&gt;12&lt;/option&gt; &lt;option&gt;13&lt;/option&gt; &lt;option&gt;14&lt;/option&gt; &lt;option&gt;15&lt;/option&gt; &lt;option&gt;16&lt;/option&gt; &lt;option&gt;17&lt;/option&gt; &lt;option&gt;18&lt;/option&gt; &lt;option&gt;19&lt;/option&gt; &lt;option&gt;20&lt;/option&gt; &lt;option&gt;21&lt;/option&gt; &lt;option&gt;22&lt;/option&gt; &lt;option&gt;23&lt;/option&gt; &lt;option&gt;24&lt;/option&gt; &lt;/select&gt;&lt;/p&gt; </code></pre> <p>The user should be able to select numbers between 01 - 24 - right?</p> <p>But in the table where these entries are stored, I see an entry like:</p> <pre><code>01,05 </code></pre> <p>How could this have happened? When I try to type into the field I am not able to it - I can only choose one of the options in the list?</p> <p>Any idea how the user could have managed to enter an option like the one above?</p> <p><strong>EDIT</strong> Based on some of the comments I looked into the backend of the database and found that the user has made multiple selections. So now the question has another related question:</p> <p>If I do not specify the MULTIPLE attribute in the SELECT element, does it mean a user can overcome the default behaviour of single select?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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