David,

Another way to handle form submission is to have a separate action for
each form, handle everything in the doPerform() method and test for
which button is clicked by seeing if the parameters contain the name of
the button. 

This avoids the alternative of using javascript to set values of hidden
fields.

Peter

On Fri, 2004-03-26 at 20:13, David Demner wrote:
> Ah!  Worked great.
> 
> Will this work if there is multiple submit buttons on a form (ie:
> update/delete)?  It worked for both buttons in my sample size of 1 form, but
> will it work in general?  I'm concerned because both the hidden field and
> submit button name get passed; the button name is first, but I want to make
> sure the hidden field will never appears first.
> 
> Thanks again,
> 
> David
> 
> -----Original Message-----
> From: Jürgen Hoffmann [mailto:[EMAIL PROTECTED] 
> Sent: Friday, March 26, 2004 10:51 AM
> To: 'Turbine Users List'
> Subject: AW: Form submittal problem
> 
> 
> Hi,
> 
> just put a hidden field into the form. <input type="hidden"
> name="eventSubmit_doWhatever" value="1"/>
> 
> kind regards
> 
> Jürgen Hoffmann
> 
> -----Ursprüngliche Nachricht-----
> Von: David Demner [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 26. März 2004 19:45
> An: [EMAIL PROTECTED]
> Betreff: Form submittal problem
> 
> I'm trying to get around a form submittal problem.  I have a very simple
> form (1 text box and 1 submit button named eventsubmit_doWhatever) where
> method="post" and action="$link.setAction("MyAction")".
>  
> When the user clicks on the button, the submit button's name is passed with
> the form data and everything works fine.  When the user hits enter the
> button in the form, the submit button's name doesn't get passed and the
> doPerform event gets called instead.  This effectively breaks the form when
> the enter key is pressed.
>  
> How do other people handle this problem??
>  
> Thanks,
>  
> David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to