when rendered as:
{{ form.as_table }}
will be rendered as:
{{
<tr>
<th></th>
<td>
<ul id="id_send">
</ul>
</td>
</tr>
}}
Note the lack of input widget. I am trying to create a hidden radio
button, to store a boolean value that gets sent to the server. A
`CheckboxInput` however does work, and is argueably better in this
situation, but this may point to some underlying bug.
--
Ticket URL: <https://code.djangoproject.com/ticket/33000>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> A form with the following field:
> {{
> send = forms.BooleanField(label=False,
> widget=forms.RadioSelect(attrs={'hidden':True}))
> }}
>
> when rendered as:
> {{ form.as_table }}
>
> will be rendered as:
> {{
> <tr>
> <th></th>
> <td>
> <ul id="id_send">
> </ul>
> </td>
> </tr>
> }}
>
> Note the lack of input widget. I am trying to create a hidden radio
> button, to store a boolean value that gets sent to the server. A
> `CheckboxInput` however does work, and is argueably better in this
> situation, but this may point to some underlying bug.
New description:
A form with the following field:
{{{
send = forms.BooleanField(label=False,
widget=forms.RadioSelect(attrs={'hidden':True}))
}}}
when rendered as:
{{{
{{ form.as_table }}
}}}
will be rendered as:
{{{
<tr>
<th></th>
<td>
<ul id="id_send">
</ul>
</td>
</tr>
}}}
Note the lack of input widget. I am trying to create a hidden radio
button, to store a boolean value that gets sent to the server. A
**CheckboxInput** however does work, and is argueably better in this
situation, but this may point to some underlying bug.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33000#comment:1>
* status: new => closed
* resolution: => invalid
Comment:
If an input is marked as hidden it is not submitted with the form.
--
Ticket URL: <https://code.djangoproject.com/ticket/33000#comment:2>