Copy link to clipboard
Copied
The use case is once a user logs into our website, we would like to render the w9 form, prefilling the form with user's name and address. It seems to me I can only set mergefieldinfo at the creation of widget. Once the widget is created, the mergefieldinfo can not be changed. So if I instantiate the widget again, it's always has the same user's name and address. That makes it impossible to share W9 widget among users. My question is what's the best practice to create a template like w9 and have users to sign their own w9, with their name and address prefilled for them? Thanks!
Hello Will,
If you want the mergefield to always change as per the user's detail once the Widget is created, then as a workaround, you just need to change values in parameter <dto9:mergeFields> and can re-run the code and can then share the url (if using Widget to create url through API).
Let me know if that helps!
Regards,
-Rijul
Copy link to clipboard
Copied
Hello Will,
If you want the mergefield to always change as per the user's detail once the Widget is created, then as a workaround, you just need to change values in parameter <dto9:mergeFields> and can re-run the code and can then share the url (if using Widget to create url through API).
Let me know if that helps!
Regards,
-Rijul
Copy link to clipboard
Copied
Hi Rijul,
Here is my solution. Correct me if wrong as this solution may help others in a similar situation.
1) I need to have clients log in my website to fill out tax form.
2) Once logged in, my widget will prefill the embedded form with personal information by calling createPersonalEmbeddedWidget().
3) Show confirmation page, log documentkey.
* There are two documentkeys here, one is the key to the document instance the widget initiated and the other one is the key to the widget, which is also referred to as "documentkey" per API.
Hope this helps someone.