Hi,

I am a new django user and I am using the django trunk version.
Inside the template I am using the {{form.as_p}} template variable to
automatically output all the fields for the form.

Someone told me, not from this group, that the best way of position
edit boxes (ie <Input...>) is to use cascading style sheets.  However
when I try to do something like the following:
<style>
#id_phone_home {left:30px; top:70px}
</style>
the input box moves but not the label.

I would like to use the form.as_p() as it makes it easy to render
validation errors (rather than to have to come up with stuff to do
this myself).

An excerpt from my form.as_p() is shown below:

(Pdb) form.as_p()
u'<p><label for="id_phone_home">Phone home:</label> <input
id="id_phone_home" type="text" name="phone_home" maxlength="20" /></p>
\n
<p>
<label for="id_phone_work"
>Phone work:</label> <input id="id_phone_work" type="text" name="phone_work" 
>maxlength="20" /></p>\n
<p><label for="id_phone_mobile">Phone mobile:</label> <input
 id="id_phone_mobile" type="text" name="phone_mobile" maxlength="20" /
></p>\n<p>

etc.....

Am I using the right form method?  ie as_p() ?

What is the recommended best practice here?

Thanks in advance.
Glenn.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to