Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am implementing Stripe in my Sencha Touch 2 application, and they require that I have set a custom data- HTML5 attribute on the respective input fields ala this:

<input type="text" size="20" data-stripe="number"/>
<input type="text" size="4" data-stripe="cvc"/>
<input type="text" size="2" data-stripe="exp-month"/>
<input type="text" size="4" data-stripe="exp-year"/>

I have defined my input fields in the view like this:

{
    xtype:'textfield',
    name:'expirationYear',
    'data-stripe':'exp-year',
    label:'Expiration',
    placeHolder:'Expiration Year (YYYY)'
}

I was experimenting with adding:

'data-stripe':'exp-year',

But that naturally didnt work since its not a valid Sencha attribute. How can I set custom attributes on the Sencha textfields to make sure the rendered input fields will be like in the HTML above?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.