Question:
How can I pre-populate Wix logged in member details onto an embedded form in Jotform ?
Product:
Wix Editor
What are you trying to achieve:
I have a booking form from Jotform embedded into a member only page on my Wix website. I would like to pre-fill my form with member name & logged in email
What have you already tried:
Jotform generates this basic code to embed, This works.
Make sure there are no red lines in the code and finally Publish the site.
Test it out and once it is working as expected, you can turn off Dev Mode and the code will continue to function.
Points to note:
Make sure that the ID of your Embed element is #html1. You can do this by clicking on the HTML Embed element with the Dev Mode on. You will be able to see the ID of the selected element right beside the code panel at the bottom.
The page will need to be set to Members Only in order for the code to work correctly.
You can add as many fields as you want by building upon the following syntax: + "&fieldName=" + fieldValue
Pratham, thanks for the response. It works - and your instructions were easy to follow.
I can pre-populate member name and login email. But I am having trouble with address and phone number. On my site, people only ever put in one of each - even if Wix allows for several of each. I tried
You’ll want to take a look at this documentation that lists the returned structure from .getMember() - Get Member | Velo - specifically the “Returns” part
Phone is likely to be: member.contactDetails.phones[0]. Since phone is an array, [0] allows us to choose the first phone number in the array
Address is an object, so you’ll likely need to reconstruct it according to the information you need, but it’ll be under member.contactDetails.addresses[0]., where following the . you’ll add the property from the address object you need.