-
My goal: To have the default value in a retool form to be the current users full name.
-
Issue:
{{ current_user.fullName }}in the default value works in the editor but not in the published form. -
Steps I've taken to troubleshoot: The tooltip on the default mentions ‘when a value changes’, perhaps as the user doesn’t change it never sets? Default dates and defaults based on other components do work in this form.
-
Additional info: Cloud-hosted. Screenshots to illustrate.
In editor:
In freshly opened published form:

Hi @DannyT ,
Is this a public form? If this is the case and the user is not logged in you will not get a value with {{ current_user.fullName }}.
However you could use {{ urlparams.fullName }} instead as described in the docs.
I just setup a test form that works using ?fullName=Shawn%20Fawcett in the url.
Give it a try here:
https://optipath.retool.com/form/9f4a62b3-5982-4d09-ad7d-127d9d0e0b4f?fullName=Shawn%20Fawcett
1 Like
Thanks Shawn
That’ll be it, it's a public form. I had assumed that it would have the user logged in, as it does with any app opened in the browser which is logged in.
As most users will be using the form via a link from a retool app the workaround you propose should work.
1 Like

