You can now change the placeholder text inside the hosted card fields with the cardFieldPlaceholders prop, or with setCardFieldPlaceholders if you mount the card form yourself with @flopay/js.
What changed
- Your own wording. Pass any of the keys
number,expiry,cvvandnameto replace that field's placeholder. Every key is optional, and a field you leave out keeps FloPay's default wording. - No placeholder. An empty string shows no placeholder, and the field keeps its accessible name.
- Safe text. The hosted form shows the text literally, never as HTML, and cuts it to 64 characters instead of rejecting it.
- Live updates. Changing the prop updates the fields without remounting the form or clearing what the buyer typed. Each update replaces the previous set as a whole.
What you need to do
Nothing, unless you want your own wording. Merchants who do not set the prop see no change.
The prop needs @flopay/react or @flopay/vue 1.18.0 or newer, and the method needs @flopay/js 1.18.0 or newer. See Change the card field placeholders for an example and the default wording of each field.