On Tue, 2006-09-12 at 14:35 -0500, Adrian Holovaty wrote:
> The template would look like this:
> 
>     <form action="/foo/" method="post">
>     {% if form.sendername.errors
> %}{{ form.sendername.errors.as_ul }}{% endif %}
>     <p>Your name: {{ form.sendername.as_text }}</p>
> 
>     {% if form.senderemail.errors %}{{ form.senderemail.errors_as_ul
> }}{% endif %}
>     <p>Your e-mail: {{ form.senderemail.as_text }}</p>
> 
>     {% if form.subject.errors %}{{ form.subject.errors.as_ul }}{%
> endif %}
>     <p>Subject: {{ form.subject.as_text }}</p>
> 
>     {% if form.message.errors %}{{ form.message.errors.as_ul }}{%
> endif %}
>     <p>Message: {{ form.message.as_textarea }}</p>
> 
>     <input type="submit" value="Send e-mail">
>     </form> 


Alas, it seems I'm the only one wanting to have the form framework
handle buttons as well. 

Now I'm not asking for the Form to automatically have submit buttons,
what I'm asking for is to be able to have a ButtonField or
GroupOfButtonsField .

Example: 
        I just finished working on a multi-page form that uses three
        <input type="submit" name="action"/>  with values  value="&lt;
        prev"  value="next &gt;" and value="cancel"
        
        The value of request.POST["action"] always has the correct
        value. [1] That is, the value for the button that was clicked.
        So I'm able to use it in processing.
        
        This value though, is the only one not handled by the
        Manipulator. 

Now I see in this new Form thing, you're ignoring buttons completely. 

Am I wrong to assume that the value of the button clicked can be
important? Or is it not important enough?

/Marc DM


[1] I tested it in Firefox 1.5 and Epiphany on Gnome 2.14 and IE6 and
IE4.01 on Win2k. In ie4, I had to remove the styling from the buttons so
I could click them but they submit the correct value. Contrary to what I
heard in #django


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to