materialize icon indicating copy to clipboard operation
materialize copied to clipboard

Select value won't pass when submitting a form

Open sonnety opened this issue 5 years ago • 1 comments

I am trying to submit a form using table structure but all select values data won't pass.

For example:

<form action="/action_page.php" method="post">
<table>
  <tr>
     <td>
        <div class="input-field">
            <select name="data_1">
                <option value="1"></option>
                <option value="2"></option>
                <option value="3"></option>
             </select>
           <label>data_1</label>
         </div>
       </td>
        <td>
        <div class="input-field">
            <select name="data_2">
                <option value="1"></option>
                <option value="2"></option>
                <option value="3"></option>
             </select>
           <label>data_2</label>
         </div>
       </td>
        <td>
        <div class="input-field">
            <select name="data_3">
                <option value="1"></option>
                <option value="2"></option>
                <option value="3"></option>
             </select>
           <label>data_3</label>
         </div>
       </td>
        <td>
       <div class="input-field">
                <input type="text" name="data_4" for="data_4" value=""> 
                 <label for="data_4">data_4</label>
        </div>
        </td>
      </tr>
    </form>

In this example, select values won't pass when submitting the form. The problem is when I added table structure then select values won't pass but when I removed the table structure then it works fine. Please fix this problem.

sonnety avatar May 05 '19 05:05 sonnety

We're at 2021 - almost at the end - and this issue is still happening. Is there any news on this ? Thank you. NOTE: There's an easy way around this, but it involves more code and new users are unaware of this and think there's something wrong with the code.

feiticeir0 avatar Oct 29 '21 15:10 feiticeir0