[Zope-DB] Re: Having trouble passing arguments through a
submitbutton
Laura McCord
Laura.McCord at doucet-austin.com
Fri Apr 30 11:33:19 EDT 2004
Well I found a way to accomplish this but I did not use a submit button.
In fact, I don't think you can pass an argument through a submit button.
However, this is what I did:
I created an image link where the image looks similar to a button that I
created in photoshop. Then, I created an Edit Button and Cancel button
which you can see below. The first link contains the pass of the userid
which is what I wanted to do.
<tr>
<td>
<a tal:attributes="href python: 'user_EditForm?userid=' +
str(userid)"><img src="edit_button.gif" alt="Edit"></a>
</td>
<td>
<a tal:attributes="href python: 'index_html'"><img
src="cancel_button.gif" alt="Cancel"></a>
</td>
Maybe this will help someone.
-Laura
-----Original Message-----
From: zope-db-bounces at zope.org [mailto:zope-db-bounces at zope.org] On
Behalf Of Wolfram Kraus
Sent: Friday, April 30, 2004 1:27 AM
To: zope-db at zope.org
Subject: [Zope-DB] Re: Having trouble passing arguments through a
submitbutton
Heyho!
Laura McCord wrote:
>
> Hi,
>
> I am not sure if this is possible but if I have a form like the form
> at the bottom of the page that displays user information I want to
> pass the user id to a edit form that will update the user information.
> So if I hit the Edit button I want it to take me to an edit form while
> passing the userid variable. How would I write this action? This is
> what I have in on my submit button for the "edit"
> button:
>
Just add a hidden field to the form:
> <tr><td>
> <form action="user_EditForm">
<input type="hidden" name="userid" tal:attributes="value userid">
> <input type=SUBMIT name="edit" value="Edit">
> </form>
> </td>
>
> Normally to create the link to the edit form I have this: <a
> tal:attributes="href python: 'user_EditForm?userid=' +
> str(userid)">[edit]</a> However, I don't know how to incorporate this
> with a submit button.
>
> Thanks in Advance, Laura
>
HTH,
Wolfram
_______________________________________________
Zope-DB mailing list
Zope-DB at zope.org
http://mail.zope.org/mailman/listinfo/zope-db
More information about the Zope-DB
mailing list