The Moov form Drop enables Moov customers to securely and seamlessly submit sensitive user data to Moov.
With the moov-form element, information is entered by the user and processed directly by Moov. All information is captured by iframes and hidden from the customer’s website. The moov-form coordinates user input across a collection of individual form elements, making it highly flexible and adaptable to your needs.
<moov-formname="demo-form"method="PATCH"action="/accounts/{accountID}"></moov-form><section><label>Legal business name</label><moov-text-inputformname="demo-form"name="profile.business.legalBusinessName"></moov-text-input><label>EIN</label><moov-text-inputformname="demo-form"name="profile.business.taxID.ein"></moov-text-input><label>Website</label><moov-text-inputtype="url"formname="demo-form"name="profile.business.website"></moov-text-input></section>
The moov-text-input element updates a user’s name, the moov-card-number-input element updates a user’s card number, and the moov-card-security-code-input element updates the user’s CVV.
Moov Drops require a secure HTTPS connection. If you don’t have a test environment with HTTPS enabled, we suggest setting up a hosting environment with ngrok, Netlify, or Vercel.
constform=document.querySelector('moov-form');constsuccessCallback=(response)=>{// The form was submitted successfully
response.json().then(console.log);};form.onSuccess=successCallback;
1
2
3
4
5
6
7
constform=document.querySelector('moov-form');consterrorCallback=(response)=>{// There was an error submitting the form
response.json().then(console.error);};form.onError=errorCallback;
You can call the methods of moov-form to perform various actions.
Method
Description
Parameters
Returns
checkValidity
Updates the validation state for all form inputs, and returns an isValid boolean through the onCheckValidity callback function.
None
None
reportValidity
Checks validity of the form, and alerts the user to invalid inputs using the browser’s default behavior. Returns an isValid boolean through the onReportValidity callback function.
None
None
requestSubmit
Checks validity of the form, and submits the form only if all inputs are valid.
None
None
reset
Clears out all inputs.
None
None
submit
Immediately submits the form without checking for validity.
Your Moov API token must include the required scopes for the desired form action. Refer to the API docs for your desired action to find the required scopes.