I had to deal with this recently myself. Fortunately Skeuomorphic makes it simple to change the ids for the value fields. Just create the JavaScript instance like so:
card = new Skeuocard($("#skeuocard-entry"), {
numberInputSelector: '[data-stripe="number"]',
expMonthInputSelector: '[data-stripe="exp-month"]',
expYearInputSelector: '[data-stripe="exp-year"]',
cvcInputSelector: '[data-stripe="cvc"]',
});
Then, change the actual form template like so:
<div class="credit-card-input no-js" id="skeuocard-entry">
<p class="no-support-warning">
Either you have Javascript disabled, or you're using an unsupported browser, amigo! That's why you're seeing this old-school credit card input form instead of a fancy new Skeuocard. On the other hand, at least you know it gracefully degrades...
</p>
<label for="cc_type">Card Type</label>
<select name="cc_type">
<option>...</option>
<option value="visa">Visa</option>
<option value="discover">Discover</option>
<option value="mastercard">MasterCard</option>
<option value="amex">American Express</option>
</select>
<label>Card Number</label>
<input maxlength="19" data-stripe="number" placeholder="XXXX XXXX XXXX XXXX" size="19" type="text">
<label>Expiration Month</label>
<input data-stripe="exp-month" placeholder="00" type="text">
<label>Expiration Year</label>
<input data-stripe="exp-year" placeholder="00" type="text">
<label>Cardholder's Name</label>
<input data-stripe="name" placeholder="John Doe" type="text">
<label>Card Validation Code</label>
<input maxlength="3" data-stripe="cvc" placeholder="123" size="3" type="text"></input>
</input>
</input>
</input>
</input>
</div>
You can read about the selectors on the main Github profile: https://github.com/kenkeiter/skeuocard
When a Skeuocard is instantiated, it attaches itself to a container element and removes any unneeded children, before adding its own; however, Skeuocard stores its values in pre-existing input fields, which aren't selected for removal.
By default, Skeuocard sets the following default selectors to match the underlying form fields within the container element, and use them to store values:
typeInputSelector: [name="cc_type"] numberInputSelector: [name="cc_number"] expMonthInputSelector: [name="cc_exp_month"] expYearInputSelector: [name="cc_exp_year"] nameInputSelector: [name="cc_name"] cvcInputSelector: [name="cc_cvc"] Providing any of those options with different values at instantiation will cause Skeuocard to use your supplied selector, instead!
Please note that you should follow Stripe's documentation regarding custom forms, including the use of single use tokens. You can find the documentation here: https://stripe.com/docs/tutorials/forms