Pre-populating the email field in the widget

Eli Dupuis's Avatar

Eli Dupuis

15 Mar, 2010 10:53 PM

I'm wondering if there's an easy way to pre-populate the email field when a user launches the widget from inside our application. We're already using HMAC cookies to log users into Tender based on authentication on our site, but I can't seem to find any documentation on pre-populating the email field.

Thanks in advance!

  1. 1 Posted by Eli Dupuis on 30 Mar, 2010 05:31 PM

    Eli Dupuis's Avatar

    Nudge.

    Any direction on this? It's been over 2 weeks with no response...

    We want to have the user's email address automatically in the email field of the Tender widget when it pops up. We have the users email address because they are logged into our system when they launch the widget. Just wanting to save them the extra step.

  2. 2 Posted by Justin on 30 Mar, 2010 08:35 PM

    Justin's Avatar

    Hey,

    Sorry for the delay in getting back with you. We were talking about this, thinking of an easy way we could implement this. We're thinking that you can set a variable before you include the widget javascript Tender.email = '[email blocked]'; and we'll read that when we load the widget. Would that work for you?

  3. 3 Posted by Eli Dupuis on 30 Mar, 2010 09:23 PM

    Eli Dupuis's Avatar

    That would be ideal!

    I was reading up on the widget (https://help.tenderapp.com/faqs/setup-installation/adding-and-custo...) and kind of just expected that to be in there already ;) so if you guys add it in I'll be very happy.

    Thanks!

  4. 4 Posted by Justin on 30 Mar, 2010 11:26 PM

    Justin's Avatar

    I've just committed this. You can stick this bit of JavaScript in the head of your document (or anywhere before you include the widget js file).

    <script type="text/javascript" charset="utf-8">
      if(typeof Tender == 'undefined')
        var Tender = {}
    
      Tender.widgetEmail = '[email blocked]'
    </script>
    

    We should have this deployed in the next 24 ours or so, but you can go ahead and add that code to your pages and it should just start working once we deploy.

  5. 5 Posted by Eli Dupuis on 30 Mar, 2010 11:40 PM

    Eli Dupuis's Avatar

    Perfect. Thanks a bunch!

  6. 6 Posted by Jonathan on 03 May, 2010 04:31 AM

    Jonathan's Avatar

    I think this change might have introduced a bug. When I open the widget without SSO credentials, I get the word "undefined" in the email field. See screenshot

  7. 7 Posted by Jonathan on 03 May, 2010 04:35 AM

    Jonathan's Avatar

    Also, if you have set Tender.widgetEmail and you switch to the FAQ tab and back, the email field is set to "undefined"

  8. 8 Posted by Justin on 03 May, 2010 10:49 PM

    Justin's Avatar

    Just checked in a fix for this. Should be live in the next couple days. Thanks for the report.

  9. 9 Posted by Alistair Holt on 05 May, 2010 05:25 PM

    Alistair Holt's Avatar

    I've also noticed the email field being pre-populate with 'undefined' when not using SSO. Looking forward to having a fix for this.

  10. 10 Posted by Will on 10 May, 2010 07:22 PM

    Will's Avatar

    It's just waiting to be deployed to the production server at this point. Shouldn't be much longer.

  11. Will closed this discussion on 18 Aug, 2010 10:15 PM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac