Multiple Submit buttons on Form?


#1

Is it possible to have multiple “Submit” buttons on a form?

I have a websitr where people can buy a subscription, and am trying to fit the following on one page…

  • Review Order
  • Enter Credentials
  • Enter Payment Details
  • Submit Order

In addition, I would like to verify that the email entered is valid.

Could I add a “Verify Email” button next to the Email Address field, and when the user clicks on it, an email would be sent to that email address, however it would not submit the checkout form, and ideally wouldn’t erase anything entered into the fields?

Thanks.


#2

Yes to all three questions and can you supply the scripts that you have tried.

Please simplify your post and try to concentrate on a single request.


#3

The easy way that you would do that is to submit the form in the normal way using the alternate button, have your processing code see that the alternate button is pressed, send the email, then re-draw the form with all the values that you gathered during the submission process already in place. Maybe you’d have an extra box so the user can type in the unique code that you sent them in the email.

Once you have that working, the nicer way is to use Ajax so that the form never disappears, which looks a lot nicer to the user. But get it working first, then make it nicer.


#4

Yep, that is exactly what I was thinking myself.

Something like…

IF Verify Button is pressed
THEN Generate code and send email to user
ELSEIF Submit Button is pressed
THEN process the form

I guess I could use a “sticky” form to retain values the user entered, although I wouldn’t do that for things like password and credit card details.

From a user standpoint, is it that big of a deal to just use PHP to reload the form?

Any risks in that?

How hard is it to use AJAX?

I would like to learn more modern things like that, but don’t want to break version 1 of my website which i cannot seem to get done!!!


#5

Yes, I’d say it’s always best to get it working first, then add it. You need to do it that way in any case, to cover the situation where your user might have JavaScript disabled and none of your Ajax will work in that case. I’m not sure if people still do this, or whether you have to consider it with your users.

As for whether it’s that big a deal, it can be. For example, you say that you won’t retain the credit card or password details, so when you redraw the form, will the user have to re-enter them? That will be annoying - it would annoy me, anyway.

If you’re thinking of storing the credit card details, keep in mind you have a lot of legal hoops to jump through with regard to how you protect their data.


#6

Good point.

It’s hard to please everyone on this. I had a really nice process flow, and then started hearing that it was too long and involved. So i simplified the flow to one page, but now it is creating a new problem!

Nope. Never.

The checkout page has four sections:

  • Review your items (e.g. Subscription + eBook)
  • Account credentials (e.g. username, email, password, verify password)
  • Signify you agree to TOS
  • Payment details

The “Verify Email” button would be alongside the “Email Address” field, so in theory, the user wouldn’t fill out anything below that until the email was verified.

If they do what I am hoping, they would only have to enter in their password and payment details after their email is verified.

How plausible does that sound?

Also, is it worth adding this extra functionality in the first place?

In my original design, the first thing I had people do was enter account credentials, then I popped up a message saying to go check your email. Then in the email they clciked a link which brought them to a login for to basically pick up where they left off.

It seems the experts say that if you ask for someone to sign up for an account while checking out on an ecommerce site, that is a death wish?! :open_mouth:

So instead I start off with letting people choose the membership plan they want (and possibly a free book) and then I get into the weeds with asking for account details and payment details.

It’s just that it makes me nervous having someone submit the order form without knowing if their email is valid?!

It’s not so much that I think people will put in bogus email addresses,but more so that someone will phat-finger their won email address and then have no way for me to reach them. And having to edit database records after the fact makes me nervous as well - especially because it will make an auditor question my true intentions!

So what do you think about all of that?