Skip to content

Commit

Permalink
Fixed #5053 -- Added 'action' attribute to <form> tags that didn't ha…
Browse files Browse the repository at this point in the history
…ve that attribute in docs/newforms.txt examples. Perfectionism appreciated, trickyb

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Aug 6, 2007
1 parent 89977a6 commit 9a090b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/newforms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ the "Outputting forms as HTML" section above.
The simplest way to display a form's HTML is to use the variable on its own,
like this::

<form method="post">
<form method="post" action="">
<table>{{ form }}</table>
<input type="submit" />
</form>
Expand All @@ -653,7 +653,7 @@ class' ``__str__()`` method calls its ``as_table()`` method.

The following is equivalent but a bit more explicit::

<form method="post">
<form method="post" action="">
<table>{{ form.as_table }}</table>
<input type="submit" />
</form>
Expand All @@ -675,7 +675,7 @@ individual fields for complete template control over the form's design.
The easiest way is to iterate over the form's fields, with
``{% for field in form %}``. For example::

<form method="post">
<form method="post" action="">
<dl>
{% for field in form %}
<dt>{{ field.label }}</dt>
Expand All @@ -696,7 +696,7 @@ Alternatively, you can arrange the form's fields explicitly, by name. Do that
by accessing ``{{ form.fieldname }}``, where ``fieldname`` is the field's name.
For example::

<form method="post">
<form method="post" action="">
<ul class="myformclass">
<li>{{ form.sender.label }} {{ form.sender }}</li>
<li class="helptext">{{ form.sender.help_text }}</li>
Expand Down

0 comments on commit 9a090b2

Please sign in to comment.