Skip navigation
Malcolm-Maclean
Currently Being Moderated

Pre-fill dropdown in customer details

Jul 12, 2012 9:40 AM

Hi Guys

 

Any idea how to pre-fill dropdown menus with an account holders previously submitted information?

 

Fro example if they are a member of a secure zone and have submitted there Salutation as Mr then i dont want them to have to re-select that everytime they update there details. Also i want to pre-fill in the Salutation or Country at Checkout.

 

Any ideas much appreciated

 

Cheers

Malcolm

 
Replies
  • mario_gudelj
    1,577 posts
    Oct 13, 2010
    Currently Being Moderated
    Aug 5, 2012 10:00 PM   in reply to Malcolm-Maclean

    Hi Malcolm,

     

    When customer is logged in, you can use {module_title} to render their title. This will render a title ID so you'll have to use javascript to read it and then set that title ID inside the title dropdown.

     

    The JS for it would look something like this:

     

    $('select>option[value={module_title}]').attr('selected', true);

     

    I'm not sure if that's the correct syntax but it must be close.

     

    Cheers,

     

    -mario

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points