-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styling individual elements example missing. #93
Comments
btw - here is the HTML code that I'm trying along with the js:
|
Hello! Looking at your html code I'm making a quick assumption that you're upgrading from using the v3 version of our library. First I'd like to point you to https://developers.recurly.com/reference/recurly-js/index.html#upgrading-from-v3 which will go over how you can rewrite your integration and get you properly setup to work with our latest version. Once that is setup you can refer to: https://developers.recurly.com/reference/recurly-js/index.html#styling-elements for documentation on stylizing the elements as you instantiate them. |
@gilv93 not at all. Everything you see there was built in the last week directly from your existing docs - the exact ones you point to in your response - which DO NOT provide ANY guidance on how to attach to individual form elements like the above. |
@gilv93 as a point of reference, if you look at the docs for 4.10.3 (https://developers.recurly.com/reference/recurly-js/v4.10.3/index.html) there is a section called "Individual card fields" that goes into detail about how to set them up, bind them and style them. This is MISSING from the latest docs and needs to be added to provide us with some guidance, or at least include an example in this repo that demonstrates this. |
Sorry about my assumption from before! You're right that the docs aren't clear enough and we'll be updating them to add more clarity where we can. Starting with v4.11.0 we introduced <div id="card-month"></div> const cardMonthElement = elements.cardMonthElement({
style: {
fontSize: '1em'
}
});
cardMonthElement.attach('#card-month'); The attach method itself should be called on a container If you're still having trouble, if you could show us a demo or put your code on https://codesandbox.io/ (or another similar tool), then we can inspect to see what’s going on. |
@gilv93 I really think you are way to close to this to understand the issue. This isn't about STYLING. This is about ATTACHING and BINDING to the fields. This was clearly spelled out in the previous docs. I've already had to use your standard recurlyElement, which is in the docs, since nothing else worked, so I don't have code. I do have that form above, which clearly shows individual card elements. I am STRONGLY recommending you create a new example in this repo called individual_card_elements and create a form that has a credit card number, card expiration (with mm and yy TOGETHER), CVV and zipcode form fields and then the JS code showing how to bind and style them. |
That's a great idea, thank you. We appreciate your suggestion and are working on creating a multi-element card form example now to help clear things up. |
In the last version of recurly.js, we could create individual card elements and style them. This doesn't seem possible in the latest version, and if it is there are no examples here on how to style a form with custom elements. Please advise.
The text was updated successfully, but these errors were encountered: