Send hidden value in a select

Asked

Viewed 140 times

1

Is there a property in select that when I select an option when sending it sends another one? For example:

<form action="teste.php">
  <p>
    <select name="mes" id="mess" class="selectpicker">
      <option>Janeiro</option>
      <option>Fevereiro</option>
      <option>Abril</option>
      <option>Março</option>
    </select>
  </p>
  <label>
    <button id="enviark" class="btn btn-default">Gerar Linha do tempo</button>
  </label>
</form>

For example, if I select January it sends 1 instead of January

1 answer

3


Hello,

Use VALUE as an attribute of OPTION.... thus:

  <option value="1">Janeiro</option>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.