Label and button text can be configured through the data attributes of the express script element (id='express-script'
).
Express has always supported configuration of these modal fields (current documentation):
data-amount
data-full-name
data-company-name
data-sidebar-top-description
data-sidebar-bottom-description
Now, the following fields are also supported:
data-spreedly-close-button
- the inner HTML of the close button, defaults to "Cancel"data-spreedly-name-label
- the inner HTML of the name label, defaults to "Name"data-spreedly-number-label
- the inner HTML of the number label, defaults to "Credit Card Number"data-spreedly-cvv-label
- the inner HTML of the cvv label, defaults to "CVV"data-spreedly-expiration-label
- the inner HTML of the expiration label, defaults to "Expiration Date"data-express-modal-submit
- the inner HTML of the submit button, defaults to "Pay Now"
For example, the following code will set the label for the credit card number to "Test Label":
<script
id="express-script"
data-environment-key="your-environment-key-here"
data-spreedly-number-label="Test Label">
</script>