treehouse : what would you like to learn today?
Web Design Web Development iOS Development

registration form with payment system ( paypal )

  • I'm using an ajax registration form plugin for my website and I'm thinking to implement also Paypal.

    Here is how I want to implement it :

    I have 3 labels ( Name, Phone, Email, ) and a " Buy " button.

    After the user is typing his name, phone and email they click on "Buy" and they will be redirected to the paypal payment page or if it's possible to stay on the same page.

    Probably, what I need to know is how to make the "Buy " only after the forms ( name, phone, email ) are validated.

    Is there a plugin, or a snippet of code already made to not start something which already exists.

  • There's Wufoo.

  • @chrisburton - That's not very neighbourly...

    @dynamyc - There's a couple of ways to approach this.

    Is the paypal button going to be the submit button for the form? Or is it just a button that hangs around with the form?

    For the input fields for name/phone/email - a starting point is adding "required" within the input tags, example;

    
        <input type="text" name="name" id="name" required>
    

    I've added in the name & ID attributes, because we can target those for validation.

    If you post back on whether the paypal button is the submit button of the form, or just a random button we can advise on next steps.

    Also, if you could, please post a CodePen

  • @andy_unleash Pardon?

    "Is there a plugin, or a snippet of code already made to not start something which already exists."

  • @chrisburton - I think he means like a JQuery plugin or a code snippet. Wufoo is a paid service for forms.

  • That's entirely my fault. I read it as he was looking for another way to incorporate a form that already does this.

    Also, if you use a form that doesn't redirect away from the site, I do believe you have to pay $30 (USD) for that. Wufoo is basically 5 cents cheaper and you have the markup already created for you.

  • @chrisburton thanks for your suggestion but I'm using Quform

    @andy_unleash > Is the paypal button going to be the submit button for the form? Exactly, this is what I need. And I found a paypal terminal script already made on codecanyon: paypal terminal

    So, probably what I need to do is to integrate the " pay" button from the terminal into "submit" button of the form...

  • Yes, there is a plugin from jquery called jquery validation (http://docs.jquery.com/Plugins/Validation). If you want only the buy button to show after they type correctly, you can validate their input when they start typing. Hope it helps. No need to pay for this thing. Hope it helps.

  • @dynamyc if your going to cough up for a plugin, get Gravity Forms, its incredibly easy, has a paypal plugin, WYSIWYG form creator/editor, email notifications and loads of other stuff.

    http://j.mp/12rXkfP <-- Website.

    I have a licence for it, if you want to have a play with it before you buy, shoot me a message and i'll give you access to mine for an hour or so.

    Danny.