UNPKG

@navinc/base-react-components

Version:
10 lines (5 loc) 830 B
- When prefilling the form it first takes priority from fields saved in localstorage, then it used any fields passed in via the `initialValues` prop. - `onFormSubmit` is required and should submit the values to Pardot/S3. - `dispatchOpenInfoDrawer` is required and should be a dispatch that fires the action to open the client's info drawer. - If `shouldShowLoginPrompt` is true then `loginPromptUrl` and `onLoginPromptDismiss` also need to be passed in. `onLoginPromptDismiss` should be a function that changes the state of `shouldShowLoginPrompt` to false. - if `shouldShowPasswordField` it will show an additon field to collect a password and the `onFormSubmit` will recieve a second argument with the login info(password, email). This is so the password won't accidently get passed along with the rest of the form values.