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('last_name',css_class='span2 offset4'),
                             Div('primary_number',css_class='span2 '),
                             Div('email',css_class='span2 offset4'),

         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 -


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?


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

1 user in discussion

Subodh Nijsure: 1 post



site design / logo © 2022 Grokbase