selva
selva

Reputation: 193

how to post hidden select box value

How to Post hidden check box vaule?? i have some select box in my page when user select one option i have to make it hidden for not allowing him to re-choose other option ...

Is there any other option for doing this.. I have done it by asign that select box value to another hidden input box..

echo "<select name='".$i.$dateselect."'"."onchange='datecheckvalue()'"."id='".$i.$dateselect."' >";


 function datecheckvalue()
   {
   $('#3636').trigger('click');

   //$("#dateselect").prop('disabled', true);
   }

Upvotes: 0

Views: 113

Answers (1)

Adrianopolis
Adrianopolis

Reputation: 1292

You can use the readonly attribute instead of disabled such as:

$("#dateselect").prop('readonly', true);

readonly disallows the editing of a form element while still passing it in a form post unlike the disabled attribute.

Upvotes: 2

Related Questions