You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Russell Simpkins <ru...@hotmail.com> on 2010/06/03 04:51:58 UTC

how to implement multiple forms on a single page

All,
I've been looking around the wiki and the mailing list, but can't seem to figure out what I'm doing wrong, or if I am even allowed to do multiple forms on one page with wicket. I'm using 1.4.8 and I would like to have three forms. Each of the forms work, but I noticed that one of my forms does not get its data correctly. For simplicity sake, I am doing:
<div wicket:id="formPanelA"><form wicket:id="form1"><input wicket:id="name"></form
</div><div wicket:id="formPanelB"><form wicket:id="form2"><input wicket:id="name"></form</div><div wicket:id="formPanelC"><form wicket:id="form1"><input wicket:id="searchField"></form</div>
Form2 and Form3 are using fields of the same name because both are addresses fields but are targeted for different purposes. Everything compiles, builds and runs, but here is the issue:
Form1 DOES get its dataForm2 does NOT get its data, and the form validation fails.Form3 DOES get its data
Should I be able to have 3 or more forms on a single page (there's nothing in HTML to prevent this...?) Is there a good example on how to do 3 or more forms on a page if I can do this? Its entirely possible that I muffed up somewhere, but I've spent a few hours and haven't found a good answer, so I here I am.
I apologize if this is covered on the wiki, I looked but could not find anything similar. The closest I could find was nested forms, but these are not nested - three separate forms.
Hoping for help,
Russ



 		 	   		  
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

RE: how to implement multiple forms on a single page

Posted by Russell Simpkins <ru...@hotmail.com>.
Thanks for the response - after further digging I discovered the error was one of my own creation.

> From: igor.vaynberg@gmail.com
> Date: Wed, 2 Jun 2010 20:07:51 -0700
> Subject: Re: how to implement multiple forms on a single page
> To: users@wicket.apache.org
> 
> you should be able to have as many forms as you want. create a
> quickstart and send it to the list or attach it to jira, there is
> probably a bug in your code somewhere.
> 

 		 	   		  
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

Re: how to implement multiple forms on a single page

Posted by Igor Vaynberg <ig...@gmail.com>.
you should be able to have as many forms as you want. create a
quickstart and send it to the list or attach it to jira, there is
probably a bug in your code somewhere.

-igor

On Wed, Jun 2, 2010 at 7:51 PM, Russell Simpkins
<ru...@hotmail.com> wrote:
>
> All,
> I've been looking around the wiki and the mailing list, but can't seem to figure out what I'm doing wrong, or if I am even allowed to do multiple forms on one page with wicket. I'm using 1.4.8 and I would like to have three forms. Each of the forms work, but I noticed that one of my forms does not get its data correctly. For simplicity sake, I am doing:
> <div wicket:id="formPanelA"><form wicket:id="form1"><input wicket:id="name"></form
> </div><div wicket:id="formPanelB"><form wicket:id="form2"><input wicket:id="name"></form</div><div wicket:id="formPanelC"><form wicket:id="form1"><input wicket:id="searchField"></form</div>
> Form2 and Form3 are using fields of the same name because both are addresses fields but are targeted for different purposes. Everything compiles, builds and runs, but here is the issue:
> Form1 DOES get its dataForm2 does NOT get its data, and the form validation fails.Form3 DOES get its data
> Should I be able to have 3 or more forms on a single page (there's nothing in HTML to prevent this...?) Is there a good example on how to do 3 or more forms on a page if I can do this? Its entirely possible that I muffed up somewhere, but I've spent a few hours and haven't found a good answer, so I here I am.
> I apologize if this is covered on the wiki, I looked but could not find anything similar. The closest I could find was nested forms, but these are not nested - three separate forms.
> Hoping for help,
> Russ
>
>
>
>
> _________________________________________________________________
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail.
> http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org