Skip to content

Add option to disable country and postal code inputs in CardForm component #577

@kevinhuang78

Description

@kevinhuang78

Context

I've updated @stripe/stripe-react-native package to v.0.2.0 in order to use CardForm component so that I can use a multi-line form instead of having it on one line.

Issue

I can't remove postal code input and country input.

image

I can see on the source code here that unlike CardField component, I cannot put postalCodeEnabled to false. Plus I can't see where to remove country field.
I saw that on line 79, you're doing ...props but even though I'm putting postalCodeEnabled to false it's not working

Code I'm using

const StripeCardForm = ({ onFormComplete }) => (
  <CardForm
    postalCodeEnabled={false}
    onFormComplete={onFormComplete}
  />
);

Solution I'd liked

Have the possibility to remove postal code input and country input.


Thanks a lot for taking your time answering my issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    CardFormblockedDon't start work on this until label is removedenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions