Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Django forms - List of radio buttons and list of checkboxes? [RSS Feed]

#1 Dec. 7, 2010 15:14:28

c.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django forms - List of radio buttons and list of checkboxes?


Hi how to change this checkbox code to django form?

Are you involved in any of the following? (check all that apply):<br /
>
<input type="checkbox" name="des" value="1" /> Website Design<br />
<input type="checkbox" name="svr" value="1" /> Web Server
Administration<br />
<input type="checkbox" name="com" value="1" /> Electronic Commerce<br /
>
<input type="checkbox" name="mkt" value="1" /> Web Marketing/
Advertising<br />
<input type="checkbox" name="edu" value="1" /> Web-related
Education<br /></p>

????

And how to make similar in django form to this:

Poor <input type="radio" name="rating" value="1" /> 1
<input type="radio" name="rating" value="2" /> 2
<input type="radio" name="rating" value="3" /> 3
<input type="radio" name="rating" value="4" /> 4
<input type="radio" name="rating" value="5" /> 5 Excellent

I was looking for a simple example but I couldnt find I found widget
but I am not sure is the django form code:
howreach = forms.ChoiceField(choices=boxes_choices, label='Are you
involved in any of the following? (check all that apply):',
widget=forms.CheckboxInput) is the same like the first checkbox code
above?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Django forms - List of radio buttons and list of checkboxes? [RSS Feed]

Board footer

Moderator control

Enjoy the 21st of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support