Sign up for a class before paying for it

  • Question
  • Updated 2 years ago
  • Answered
How do I require someone fill out a form before making a purchase (sign up for a class and pay for it)? Would upgrading to have the online store make this easier?
Photo of awieckert lll

awieckert lll

  • 10 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Crystal

Crystal, Champion

  • 250 Posts
  • 79 Reply Likes
Hello Awieckert

A possible solution - the form code can be adjusted so that when the user clicks the Submit button, the form contents get emailed and a new page will load in the window. The new page could be the purchase page.

Are you familiar with html and write your own forms or are you using Yola's form widget?

At the end of the initial line of the form code, after the "mailto:..." add onsubmit="location.href='xxxxxxxx.php';" . Replace the xxxxxx with the full page URL of your purchase page.

If you want to try this solution and need more info let me know... I was trying it on my own site to test it - I first created a Yola form, viewed the html code for it, copied the html code. Then I created a second form by pasting the code in an html widget (so that I could modify the code) and modified the first form line by adding the code as mentioned above. I received the form info in a text and the second page automatically loaded.
Photo of awieckert lll

awieckert lll

  • 10 Posts
  • 0 Reply Likes
Thank you, Crystal! I'll try that method this week. It sounds easy enough, but I would have never thought of that. :)
Photo of awieckert lll

awieckert lll

  • 10 Posts
  • 0 Reply Likes
Okay, I've created my form using the Yola widget and have copied and pasted the HTML code. But I don't see the "mailto:..." part. I've done "Control + F" to try to find it, and it doesn't show up, even in the original source.
Photo of Crystal

Crystal, Champion

  • 250 Posts
  • 79 Reply Likes
Hello Awieckert,

I see where I wrote it wrong, it is where mailto normally is. I'll copy the code line for my form below. In yours the string of numbers in the url will be different. Also change the pagetwo.php to be the name of your second page.


<form method='post' action='http://forms.yola.com/formservice/en/f6dc6/I22/' onsubmit="location.href='pagetwo.php';">
Photo of awieckert lll

awieckert lll

  • 10 Posts
  • 0 Reply Likes
Thank you. I'm still not quite sure where this goes. I'll try playing around with it and see what I come up with.
Photo of Crystal

Crystal, Champion

  • 250 Posts
  • 79 Reply Likes
Hello Awieckert, It is the very fist line of the form code.

Yours make look similar to:

<form method='post' action='http://forms.yola.com/formservice/en/f6dc6/I22352/' >


The part that needs to be added is the the last part of the line onsubmit="location.href='pagetwo.php';" so that it reads:

<form method='post' action='http://forms.yola.com/formservice/en/f6dc6/I2352/' onsubmit="location.href='pagetwo.php';">


Is your page with the form code included in it, published online that I could look at it?
Photo of awieckert lll

awieckert lll

  • 10 Posts
  • 0 Reply Likes
I think I've done it all correctly now, but keep getting this message.

404. Sorry, we can't seem to find that page, click here to return to the homepage

Here's the URL to the form that's done with the HTML change.

http://laughinglanguagelearner.yolasi...

I am trying to link to the "Checkout" page. The first line of HTML was a guess. It's what made the page look right, but maybe I need to copy more or less from the original page?
Photo of awieckert lll

awieckert lll

  • 10 Posts
  • 0 Reply Likes
I've tried using the full URL and just using 'checkout.php.' No luck with either. :(