Widget Pre-append User Email and Name?

Answered Mark Uretsky 8 years ago

If I know the user email is there a way to set the user email so they don't have to add it manaully when they use the feedback/contact form?

Replies (3)

photo
1

Hello Mark,

Could you please describe in more details what do you mean in regards to form submission?

As of now, in order to submit form, you need to enter email for user to get future notifications on thr request.

Let us know your process in more details.

photo
1

Hello Stas,


Yes I would like to set those field myself because I have the user email/name. I'm using the widget on my main app after the users are logged in so they could share ideas or contact us at any time. The problem it requires them to enter the email and name, I want to default assign it to what I have already available lets say if it was possible to manually open the full screen tab with values like: {email: '..', name: '..'} or maybe when adding the JS script tag also include options with default values? Thanks

photo
1

Thank you for clarification. I'll address this question to our development team and get back to you on Monday

photo
photo
1

Hello, Mark.

You can implement it by using our JSSDK.

Working example is here:


  1. if ('UR' in window) {
  2. var viewport = UR.ns('supportCenter').get('viewport');
  3. viewport.on('switchDesktop', function (event, name) {
  4. if ('feedback_topic_add' == name || 'helpdesk_ticket_add' == name) {
  5. var controls = UR.ns('supportCenter').get('viewportControls'),
  6. desktop = controls.getDesktop(controls.getCurrentDesktopName());
  7. setTimeout(function () {
  8. desktop.find('[ur-element="email"]').val('Your_email');
  9. desktop.find('[ur-element="name"]').val('Your_name');
  10. }, 50);
  11. }
  12. });
  13. }

photo
1

You're welcome!

photo
Leave a Comment
 
Attach a file