FAQ
I am using django-crispy form to layout some of the form fields as
shown below so that the first_name, last_name appear in one row, same
with primary_number, email etc.
Also I have set the label to blank and using place holder to display
hints to user.


                         Div(
                             Div('first_name',css_class='span2'),
                             Div('last_name',css_class='span2 offset4'),
                             css_class='row-fluid'),
                         Div(
                             Div('primary_number',css_class='span2 '),
                             Div('email',css_class='span2 offset4'),
                             css_class='row-fluid'),

         self.fields['first_name'].label = ""
         self.fields['first_name'].widget.attrs['placeholder'] = u'First Name'
         self.fields['last_name'].label = ""
         self.fields['last_name'].required = True
         self.fields['last_name'].widget.attrs['placeholder'] = u'Last Name'

And the form looks like shown here -

https://github.com/snijsure/calparks-django/blob/master/screen-shots/crispy-form-layout.png

However I would like to show similar form during "edit" view such that
  label for the field appears on the top

First Name Last Name
<text-field-with-current-value> <text-field-with-current-value>

Is there way to do that? I can also go with that scheme while adding
new entry as well.
I guess I need to find a way to arrange label vertically when using crispy-form

If this can't be done in crispy-form are there other layout packages
that would allow me to do that?


-Subodh

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-users @
categoriesdjango, python
postedJun 12, '13 at 9:39p
activeJun 12, '13 at 9:39p
posts1
users1
websitedjangoproject.com

1 user in discussion

Subodh Nijsure: 1 post

People

Translate

site design / logo © 2022 Grokbase