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?