Forum Moderators: open

Message Too Old, No Replies

Help with submit buttons!

help w/adding a button that will keep data, and clear form

         

crazygutgut

8:23 pm on Oct 28, 2004 (gmt 0)

10+ Year Member



Hi
Forum Newbie...

I created a Dynamic form for a poll I am doing for a dog club. The poll records dog information. I need a way for people with multiple dogs to "add another dog". What I was hoping for was a button to to put next to submit button, so you could either submit the form or add another dog. "adding another dog" would "save" the current info, but allow the user to use the same form...

can this be done?

Thanks
Paul

sonjay

10:20 pm on Oct 28, 2004 (gmt 0)

10+ Year Member



What server-side language are you using? In php, it would be a piece of cake to have this form submit to the same page. Give the "Add another" button a different name and value. After submission, write the info the db (or whatever you do with you), and check to see if the "Add another dog" value is set. If it is, you display the form again. If it's not, you say "thanks for adding your dog."

RonPK

5:49 am on Oct 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, it can be done. Create a <div> inside your form, and use the innerHTML property to add stuff to that div.

Welcome to WebmasterWorld [webmasterworld.com], crazygutgut.

crazygutgut

3:36 pm on Oct 29, 2004 (gmt 0)

10+ Year Member



I am using "responso matic" for the server stuff, i guess, I am not really that knowledgable of Javascript, and have been relying on copy paste for much of it.

RonPK can you paste a sample of the button since I am not familar with the tag you mentioned!

THanks again.