Justin Thiele justinthiele

View subscriptions.js
1 2 3 4 5 6 7 8 9 10
(function() {
var subscription;
jQuery(function() {
Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content'));
return subscription.setupForm();
});
subscription = {
setupForm: function() {
return $('#new_subscription').submit(function() {
$('input[type=submit]').attr('disabled', true);
View Readme.md

This is a feature I struggled with for quite awhile, so I thought I'd share my solution. The code is actually pretty simple once I got it figured out. Hopefully it will save somebody else some headaches.

So here's what we're doing

To create an easy on-boarding process, I've put a New List form on the front page of Favsi.com. However, creating a list requires the user to be authenticated, so I needed to create a way to retain the user's New List form data through the authentication/registration process, and then post it. Here's a screenshot of the front page: Favsi Front Page Form

The flow would go like this

  1. User goes to the front page.
  2. User fills out the New List form and presses the Create List button.
Something went wrong with that request. Please try again.