Conditional automatic fill ?

  • Profile Image
    Manstud
    Asked on February 19, 2011 at 11:59 AM

    Hello,

     

    I am a french training center's manager. My website presents all my training offer on one page per course. All these pages lead to the contact form. At this time, every customer arriving on the contact form has to fill the course he wants to attend or ge more information about.

     

    Is it possible to automatically fulfill the "course" heading (called "Formation souhaitée" in the form), depending on which website page the user is coming from ?

     

    Sincerely,

    Emmanuel GUILLARD

  • Profile Image
    DanielGriffin
    Answered on February 21, 2011 at 09:39 AM

    Hi Manstud,
    There are a couple of ways to do this.

    The easiest is to simply have a different version of the contact form for each link. 

    for example:
    http://www.intouchmedia.fr/Contact_training1.html
    http://www.intouchmedia.fr/Contact_training2.html
    http://www.intouchmedia.fr/Contact_training3.html
    etc...

    Edit each version of the form in the form builder by highlighting the field and then clicking on the "Selected" button in the top menu.  This will allow you to set the default value in the drop down list.

    If you don't want to use multiple copies of the form, then it's a bit complicated and you'll have to do some programming.  If you are comfortable writing javascript, you could try following. 

    1. download the full source of the form and edit it so that the select box (on your contact for it's id=14) has a little piece of javascript to write the word "SELECTED" into the correct option.

    2. change the links on your course pages so that they send a course name or ID to the contact form.  For example

    http://www.intouchmedia.fr/Contact.html?coursename=training1

    3. When your page loads, get javascipt to check the name of the course, then use that name to select the correct option.

    As I said, it's a bit complicated and not exactly ideal.  If you can live with different copies of the form, then I would recommend that.  But if you want to try modifying the page, let me know and I'll try to help you.

    Thanks,
    Daniel