Iframe Documentation

Embeding the widget

To embed the widget on your web page:

  1. Import widget's JavaScript library (two ways):

  2. Add an empty <div id="wealthon" /> element, where you want your widget to be rendered

  3. Call the embedWealthonForm function, with divId and optional params


See the example below:

Via cdn script
<!-- index.html / head -->
<script src="https://wealthoncdn.s3.eu-central-1.amazonaws.com/assets/bundle.min.js"></script>
<!-- index.html / body -->
<div id="wealthon" />
// index.js
embedWealthonForm({
  // must match the div element id
  divId: 'wealthon',
  onSuccess: () => {
    console.log('Success');
  },
  onError: () => {
    console.log('Failure');
  },
});

embedWealthonForm params

Parameter Description Default Required
divId Iframe's wrapper id. Make sure this div element already exists before calling the embedWealthonForm() wealthon false
onSuccess Callback function which fires after successful submitting of the application. - false
onError Callback function which fires after error occuring. - false
width Value which sets iframe's width 100% false
height Value which sets iframe's height 100vh false

onSuccess callback params

Name Description Type Required
tokenId Token id of submitted application string false