Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple forms submission with one button

 
Swapna latha
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am developing an astrology website, in which there are two forms , two forms are for male and female.

Both male and female enter their date of birth details as name, date of birth, time of birth and place of birth. I have a simple pojo class with the fields as mentioned. I can able to save single form details.

I am not getting any idea how to store two forms information on one click.

thanks

swapna
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this Struts 1 or 2? In Struts1, you can't. You'd have to do one of the following:
1) Create a form with both
2) Have Struts automatically populate one form and use request.getParameter() in your action to populate the other one manually.
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you have two separate forms if the information on both forms is the same? Why not have a radio button for male/female and use a single form?
If you have to display male and female information, why not make a single form and sort out the data in your action?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic