hellboy_matcha Posted December 5, 2008 Share Posted December 5, 2008 Hi Guys, I have a situation in here regarding forms. I have 3 different forms, each one with it's own MySQL table to be filled by a single user but instead of having 3 submit buttons for each form i want to have one submit button for all the 3 forms. In other words: After filling the third form the user hits submit button and it sends the data on the first, second and third form to each correspoding table. How can i structure this? Quote Link to comment https://forums.phpfreaks.com/topic/135656-one-submit-button-for-3-forms/ Share on other sites More sharing options...
gevans Posted December 5, 2008 Share Posted December 5, 2008 Why don't you use one form and name the inputs, textareas, radio buttons etc.. accordingly Quote Link to comment https://forums.phpfreaks.com/topic/135656-one-submit-button-for-3-forms/#findComment-706761 Share on other sites More sharing options...
hellboy_matcha Posted December 5, 2008 Author Share Posted December 5, 2008 Ok i agree with you. But it's gonna be a huge scrolling from the top to the bottom of the browser since my forms are huge. Is there any way of breaking that one form in partes? Part 1 Part 2, etc etc Quote Link to comment https://forums.phpfreaks.com/topic/135656-one-submit-button-for-3-forms/#findComment-706779 Share on other sites More sharing options...
gevans Posted December 5, 2008 Share Posted December 5, 2008 Why don't you split it into three pages, submit the first, then take them to the second page to fill in the second? Quote Link to comment https://forums.phpfreaks.com/topic/135656-one-submit-button-for-3-forms/#findComment-706788 Share on other sites More sharing options...
premiso Posted December 5, 2008 Share Posted December 5, 2008 As a side note, you can use <div>'s and set the style.display to none and have a link "show part 2" when clicked on it hides part one and shows part 2. Which is better, I dunno. Just figured I would throw that option out there. Quote Link to comment https://forums.phpfreaks.com/topic/135656-one-submit-button-for-3-forms/#findComment-706799 Share on other sites More sharing options...
gevans Posted December 5, 2008 Share Posted December 5, 2008 premiso's idea is a very nice one, I've used it on a big registration form before that split into 7 parts. Little bit of javascript can make it go a long way!! Also setting <a name="form-part2"></a> and in the link that opens the next section have #form-part2 as the link and return true will show the second part and move the page down for you, otherwise you can find your user will end up at the top of the page bot times they reveal more of the form! Quote Link to comment https://forums.phpfreaks.com/topic/135656-one-submit-button-for-3-forms/#findComment-706805 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.