angular-payments icon indicating copy to clipboard operation
angular-payments copied to clipboard

Changed how stripe-form detects values

Open auser opened this issue 11 years ago • 7 comments

Rather than depend upon the scope to be named with specific values, stripeForm can now pick off values by the naming of form elements.

I.e. Rather than depending upon ng-model="number", if there is a field in the form with the name="number" it will work.

<input type="text" 
name="number" class="input-block-level" ng-model="payment.number" payments-validate="card" payments-format="card" payments-type-model="type" ng-class="myForm.number.$card.type"/>

This is a much more Angular-ish approach.

auser avatar Mar 19 '14 06:03 auser

Additionally added main to bower.json

auser avatar Mar 22 '14 19:03 auser

Can you update the example to include the name="number" field? As it is, the example is not showing the logo. Thank you so much. I edited the example and can push but it just adding the name attribute to the above element.

Thank you so much. This is really great work :)

jpsmith1981 avatar Mar 23 '14 06:03 jpsmith1981

Wait... I believe I did already... Did this not work for you?

auser avatar Mar 24 '14 06:03 auser

Or did you mean update the README?

auser avatar Mar 24 '14 06:03 auser

In the index.html of your example you have:

The super cool credit card logo appearing in the input field does not work. However if you add name="number" to this field it works amazingly.

jpsmith1981 avatar Mar 25 '14 05:03 jpsmith1981

I'd love to see this merged in.

kencaron avatar Jun 20 '14 18:06 kencaron

+1 Would be great to have this merged

niyando avatar Aug 12 '15 11:08 niyando