The easiest way to prefill fields of the Lema widget with values is to attach a query parameter when referencing the site on which the widget is embedded (in this case the widget is embedded into the page https://raisenow.com/lema/).
If you build a URL like the following, you can inject values into the Lema form fields:
[URL of your Lema-Site]?rnw-[fieldname as named in Manager]
In the otherwise empty widget at https://raisenow.com/lema/, the above URL injects:
- fistname: John
- lastname: Doe
- Selects CHF 10 (default was CHF 5)
You can also inject other values such as recurring intervals, email addresses or even define and fill new custom-fields such as CRM-specific fields following this pattern.
If you are unsure about the field to aim for, open your browser's dev tools and search the widget's markup for "stored_customer_firstname" to learn which fields are present in your specific Lema instance
To give you a more advanced example, we want to show you how to preselect the country of the donor in the drop down at the bottom of the widget. In order to do so you need to set the following parameter in the URL: rnw-stored_customer_preselected_country
For example adding this to the URL will set the country selection to Germany. This is especially useful if you have a landingpage per country.
If you are using the RaiseNow Customer Store, you also have the possibility to fill the Widget with data stored at RaiseNow by providing the query parameter