I am customizing the behavior of our Zendesk Guide portal. When a user starts creating a new ticket I pre-fill a couple of fields of the form using scripts.js based on the user's profile. It works well for a some fields, but not for the phone number. This is the code I came up with:
$("#request_custom_fields_123").value = HelpCenter.user.phone
However Helpcenter.user.phone does not exist and HelpCenter.user has no internal field that would contain the phone number. (Here I changed the actual field name to request_custom_fields_123.)
How can I retrieve the phone number of the current user from scripts.js? Or is there any other way to pre-fill this field on the form?