Search code examples
gigya

Displaying the user name in a Gigya form


The Gigya documentation mention (at part Display a Field Value) that in a label, it is possible to use double curly brackets and a field from the Schema to display it. Like Hi, {{profile.firstName}}!

That is the theory, but it doesn't work for me. I see the value of profile.firstName in the console but this double curly bracket thing just isn't converted to the value. Any idea how can it be debugged or solve this?

Update: I try to use this feature on the Profile Update screen after the user is logged in. And calling accounts.getAccountInfo, I get the profile and the firstName has value as well.

Update (29/11/2019): Thanks for the help, @Levi! Finally, I found the missing part: data-binding="true" should be added to the label or h2 tag.


Solution

  • From the limited information, it is difficult to tell, however, a couple things to note are that the profile object is only available for logged in users, so this will only work on Profile Update type screens. Also, you must have RaaS enabled on your account. Finally, this only works for fully registered users, if you are using a lite user login token, the profile fields are also not available. Other than that, if there is a test page I can take a look or you can open a support ticket.