You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Suzy Fynes <su...@decisioningsolutions.com> on 2008/02/26 22:11:48 UTC

Multiple / Nested Forms

Hi,

 

Does anyone know if its possible to have nested forms on a JSP? Essentially
have a html form, then another form within it.  

 

Thanks,
Suzy


Re: Multiple / Nested Forms

Posted by Wendy Smoak <ws...@gmail.com>.
On Tue, Feb 26, 2008 at 2:11 PM, Suzy Fynes
<su...@decisioningsolutions.com> wrote:

>  Does anyone know if its possible to have nested forms on a JSP? Essentially
>  have a html form, then another form within it.

Unless something changed while I wasn't looking, nested forms are not
allowed in HTML.

http://www.w3.org/TR/html4/interact/forms.html#h-17.3

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Re: Multiple / Nested Forms

Posted by Musachy Barroso <mu...@gmail.com>.
Are you trying to submit to different urls with different submit buttons?

musachy

On Tue, Feb 26, 2008 at 4:20 PM, Dave Newton <ne...@yahoo.com> wrote:
> --- Suzy Fynes <su...@decisioningsolutions.com> wrote:
>  > Does anyone know if its possible to have nested forms on a JSP? Essentially
>  > have a html form, then another form within it.
>
>  AFAIK that would be invalid HTML (and wouldn't make any sense anyway).
>
>  Dave
>
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [struts] [OT] Re: Multiple / Nested Forms

Posted by Andy <an...@hotmail.com>.
I dont have that but I was trying to describe the concept Im going for.  Thoughts appreciated.



> Date: Tue, 26 Feb 2008 14:11:53 -0800> From: newton.dave@yahoo.com> Subject: RE: [struts] [OT] Re: Multiple / Nested Forms> To: user@struts.apache.org> > --- Andy <an...@hotmail.com> wrote:> > In the example below, it would be nice to submit the inner form and then in> > the inner action class have available the inner form and the outer form,> > and to do so without having to manually copy over each field. Any creative> > ideas? :)> > > > So if I have:> > > > <form id="outer" method="post" action="/outer.do">> > ...> > > > <form id="inner" method="post" action="/inner.do">> > ... > > </form>> > </form>> > If you have that you have invalid HTML.> > Dave> > > ---------------------------------------------------------------------> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org> For additional commands, e-mail: user-help@struts.apache.org> 
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx

RE: [struts] [OT] Re: Multiple / Nested Forms

Posted by Dave Newton <ne...@yahoo.com>.
--- Andy <an...@hotmail.com> wrote:
> In the example below, it would be nice to submit the inner form and then in
> the inner action class have available the inner form and the outer form,
> and to do so without having to manually copy over each field.  Any creative
> ideas? :)
>  
> So if I have:
>  
> <form id="outer" method="post" action="/outer.do">
>     ...
>  
>     <form id="inner" method="post" action="/inner.do">
>         ...    
>     </form>
> </form>

If you have that you have invalid HTML.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [struts] [OT] Re: Multiple / Nested Forms

Posted by Andy <an...@hotmail.com>.
I didn't catch this original post but I was actually wondering how to manage embedded forms with Struts1.  
 
In the example below, it would be nice to submit the inner form and then in the inner action class have available the inner form and the outer form, and to do so without having to manually copy over each field.  Any creative ideas? :)
 
So if I have:
 
<form id="outer" method="post" action="/outer.do">
    ...
 
    <form id="inner" method="post" action="/inner.do">
        ...    
    </form>
</form>

 

> From: suzyfynes@decisioningsolutions.com> To: user@struts.apache.org> Subject: RE: [struts] [OT] Re: Multiple / Nested Forms> Date: Tue, 26 Feb 2008 16:29:55 -0500> > Cheers guys,> I'm trying to submit two forms but one of the forms requires calculated> values from the second so was wondering if it was possible to put one form> within the other. > > Thanks Dale, I'll go with the javascript option of copying the required> fields as hidden fields for the initial form.> > Thanks> Suzy> > -----Original Message-----> From: Dale Newfield [mailto:Dale@Newfield.org] > Sent: February 26, 2008 4:26 PM> To: Struts Users Mailing List> Subject: Re: [struts] [OT] Re: Multiple / Nested Forms> > Suzy Fynes <su...@decisioningsolutions.com> wrote:> > nested forms> > What is it that you're trying to achieve?> > If you have some inputs you want to appear in several forms the two > simplest solutions would be 1> to have multiple forms and add javascript > to copy values from one into hidden fields in the other just before > submission, or 2> to add them all into a single form and either adjust > the submission page with javascript before submission or put logic in > the action to recognize which submission button was pressed and do the > right thing.> > -Dale> > ---------------------------------------------------------------------> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org> For additional commands, e-mail: user-help@struts.apache.org> > > ---------------------------------------------------------------------> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org> For additional commands, e-mail: user-help@struts.apache.org> 
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join

RE: [struts] [OT] Re: Multiple / Nested Forms

Posted by Suzy Fynes <su...@decisioningsolutions.com>.
Cheers guys,
I'm trying to submit two forms but one of the forms requires calculated
values from the second so was wondering if it was possible to put one form
within the other.  

Thanks Dale, I'll go with the javascript option of copying the required
fields as hidden fields for the initial form.

Thanks
Suzy

-----Original Message-----
From: Dale Newfield [mailto:Dale@Newfield.org] 
Sent: February 26, 2008 4:26 PM
To: Struts Users Mailing List
Subject: Re: [struts] [OT] Re: Multiple / Nested Forms

Suzy Fynes <su...@decisioningsolutions.com> wrote:
> nested forms

What is it that you're trying to achieve?

If you have some inputs you want to appear in several forms the two 
simplest solutions would be 1> to have multiple forms and add javascript 
to copy values from one into hidden fields in the other just before 
submission, or 2> to add them all into a single form and either adjust 
the submission page with javascript before submission or put logic in 
the action to recognize which submission button was pressed and do the 
right thing.

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [struts] [OT] Re: Multiple / Nested Forms

Posted by Dale Newfield <Da...@Newfield.org>.
Suzy Fynes <su...@decisioningsolutions.com> wrote:
> nested forms

What is it that you're trying to achieve?

If you have some inputs you want to appear in several forms the two 
simplest solutions would be 1> to have multiple forms and add javascript 
to copy values from one into hidden fields in the other just before 
submission, or 2> to add them all into a single form and either adjust 
the submission page with javascript before submission or put logic in 
the action to recognize which submission button was pressed and do the 
right thing.

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[OT] Re: Multiple / Nested Forms

Posted by Dave Newton <ne...@yahoo.com>.
--- Suzy Fynes <su...@decisioningsolutions.com> wrote:
> Does anyone know if its possible to have nested forms on a JSP? Essentially
> have a html form, then another form within it.  

AFAIK that would be invalid HTML (and wouldn't make any sense anyway).

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org