Pregunta

i have one form and i want send data when i have disable input.
is way for this.
my code is :

<form method="post" action="">
    <table class="tbl_wheader" style="width: 200px;">
        <tbody>
        <tr class="even">
            <td>
                state
            </td>
            <td>
                <input type="text" id="state_id" name="state_id" disabled="">
            </td>
        </tr>
        <tr class="even">
            <td>
            </td>
            <td>
                <input type="submit" value="ok" name="addschool">
            </td>
        </tr>
    </tbody>

thanks.

¿Fue útil?

Solución

you can store your data in hidden input

<input type="text" name="state_id" disabled="disabled" value="value" />
<input type="hidden" name="state_id" value="same value" />

or you can use readonly attribute

<input type="text" name="state_id" readonly value="value" />
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top