Occasional Contributor I

Pre-populated Sponsor Email Field

We have everything working great.  The only thing I'd like to improve on is in the Sponsor's email field.  We pre-populate this field with  When the user tabs down to it they are placed at the end of this text.  I would like to place them at the beginning of the text so they just have to type the sponsor's name and not have to cursor to the front then type.


Re: Pre-populated Sponsor Email Field

Interesting use case...  Seems like you need some JavaScript to do this.


The following seems to do the job – paste it into the Footer HTML of the registration form.  You'll need to make an obvious change (change the string to whatever your Initial Value is).  Works OK on Firefox and Chrome, I did not test it on Internet Explorer:


<script type="text/javascript">{literal}
(function () {
  var f = document.forms[0].sponsor_email;
  f.onfocus = function () {
    if (f.value == "") {
      window.setTimeout(function () {
        if (f.createTextRange) {
          var range = f.createTextRange();
        } else if (f.setSelectionRange) {
          f.setSelectionRange(0, 0);
        } else if (typeof f.selectionStart != "undefined") {
          f.selectionStart = f.selectionEnd = 0;


Credit:  Thanks to this Stack Overflow article for the basic text range code tips.
Occasional Contributor I

Re: Pre-populated Sponsor Email Field

Thanks, I'll give it a try and let you know how I make out.

Occasional Contributor I

Re: Pre-populated Sponsor Email Field

Works on IE as well.  Thanks for your help.

MVP Expert

Re: Pre-populated Sponsor Email Field

wmccall - just a followup question.

How does this work for you? Does the guest have to input the exact correct email adress, or the exact correct name as it's listed in AD? I've been unable to get wildcard to work in this field..

John Solberg

-ACMX #316 :: ACCX #902 :: ACSA
Aruba Partner Ambassador
Intelecom/NetNordic - Norway
Remember to Kudo if a post helped you! || Problem Solved? Click "Accept as Solution" in a post!
Occasional Contributor I

Re: Pre-populated Sponsor Email Field

This is working as advertised and it makes it look a little more polished and cleaner for the guest.  Tabing through the fields and being placed in front of the the guest types in the exact first_lastname (this is how our email addresses are formatted) of the company sponsor with the end result looking like  We didn't go as far as being able to search for a user as we didn't want our emails to be made public.

MVP Expert

Re: Pre-populated Sponsor Email Field

yea, it would be very nice if it were possible to easely link this field to for example ldap and than have it populate a dropdown list with members from a group or something.


Luckely our company isn't too big so I manualy created the dropdownlist containign all our people for the demo unit we have running actively to show off some stuff.

For bigger companies a subdivission per department or something would be nice too.

Koen (ACMX #351 | ACDX #547 | ACCP)

-- Found something helpful, important, or cool? Click the Kudos Star in a post.
-- Problem Solved? Click "Accept as Solution" in a post.
Aruba Employee

Re: Pre-populated Sponsor Email Field

Watch this space, we will be looking at adding LDAP/AD search in a future version.  Our 6.1 release will include this capability for Airgroup and we are hoping to port it to sponsor approval subsequently.  As mentioned by OP some customers will not want to populate that information on a public facing registration page but is a good feature enhancement.



Search Airheads
Showing results for 
Search instead for 
Did you mean: