mardi 30 septembre 2014

HAML form wont submit


Vote count:

0




I'm having trouble with a haml form for stripe. I can't get my submit to function. This is my first time building a from wit haml, any input will help. I'm not even sure if my fields are set up correctly to save into the database.



.container
%section#checkout-form
= form_tag("", method: "POST", id: "payment-form") do
.row
#checkout-form.small-8.columns
.row
#name-form.small-12.columns
.row
.small-6.columns
= label_tag :frist_name, "First Name"
= text_field_tag :name => "First Name", :placeholder => "John", :type => "text"
.small-6.columns
= label_tag :Last_Name, "Last Name"
= text_field_tag :name => "Last Name", :placeholder => "Smith", :type => "text"
.row
.small-12.columns
= label_tag :Email, "Email"
= text_field_tag :name => "Email", :placeholder => "fan@bandfund.com", :type => "text"
#address-info.small-12.columns
.row
.small-12.columns
= label_tag :Address1, "Address 1"
= text_field_tag :name => "Address1", :placeholder => "123 Street", :type => "text"
.row
.small-12.columns
= label_tag :Address2, "Address 2"
= text_field_tag :name => "Address2", :placeholder => "Apartment/Suite", :type => "text"
.row
.small-6.columns
= label_tag :City, "City"
= text_field_tag :name => "City", :placeholder => "Joplin", :type => "text"
.small-6.columns
= label_tag :State, "State"
= text_field_tag :name => "State", :placeholder => "Missouri", :type => "text"
.row
.small-6.columns
= label_tag :ZIP, "ZIP"
= text_field_tag :name => "ZIP", :placeholder => "64804", :type => "text"
.small-6.columns
= label_tag :Country, 'Country'
= text_field_tag :name => "Country", :placeholder => "USA", :type => "text"
#billing-info.small-12.columns
.row
.small-6.columns
= label_tag :Credit_Card_Number, "Credit Card Number"
= text_field_tag :name => "Credit Card Number", :placeholder => "1234 5678 9055 5555", :type => "text"
.small-3.columns
= label_tag :Month, "Month"
= select_month nil, {add_month_numbers: true}, {name: nil, id: "card_month", class: 'minilabel', "data-stripe" => 'exp-month'}
.small-3.columns
= label_tag :Year, "Year"
= select_year nil, {start_year: Date.today.year, end_year: Date.today.year+15}, {name: nil, id: "card_year", "data-stripe" => 'exp-year'}
.row
.small-6.columns
= label_tag :Security_Code, 'Security Code'
= text_field_tag :name => "Security Code", :placeholder => "123", :type => "text"
.small-6.columns
= label_tag :Billing_ZIP, 'Billing ZIP'
= text_field_tag :name => "Billing ZIP", :placeholder => "64804", :type => "text"
/ Form Side
#checkout-info.small-4.columns
/ Info Side
%img#cards-image{:alt => "", :src => image_path("cards.svg")}/
.hr-with-margin
.reward
%h4 $25 Per Month
%h5 21 Supporters
%p I'm in a car with Kevin.
%a.button.button-green{:href => "#"} Pledge
/ row
.row.pad-top
.small-12.columns
%submit.button.button-green{type: "submit"} Submit Payment


Thanks in advanced.



asked 2 mins ago







HAML form wont submit

Aucun commentaire:

Enregistrer un commentaire