Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    contact form different receivers

    I have a 2 contactforms on a published website (www.kinderthuisverplegingkempen.be), now i would have one with a listbox for the contact person with value the emailadres. When selected one person, must the contact form send to this emailadress. Now on my host is no PHP, there is only a script "http://users.skynet.be/cgi-bin/formd.cgi" that i can use. The on explanation of this script is http://support.nl.belgacom.be/app/an...nlijke-website. I also want that the emailadress is hide for spambots in a javascript and the listbox gives the value in javascript to the script on the host. Is that possible ?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,506
    Thanks
    77
    Thanked 4,378 Times in 4,343 Posts
    Possible, yes.

    Something like this, perhaps:
    Code:
    <form method="post" action="http://users.skynet.be/cgi-bin/formd.cgi"
          onsubmit="var em=['n.be','mpe',gke','gin','ple','ver','uis','rth','nde','@ki'];
                    var s=document.getElementById('who').value; 
                    for ( var e=em.length-1; e>=0; --e) s += em[e];
                    this.to2.value=s;return true;">
    <input type="hidden" name="to2" value="" />
    <select id="who">
       <option value="Sandra">Sandra</option>
       <option value="Vanessa">Vanessa</option>
    </select>
     ... then the rest of the form ...
    I cut the main email address into short pieces and then put the pieces in REVERSE order.

    Than the JavaScript code, only when the form is submitted, takes the pieces and again reverses the order before putting the email address into the form field. It prefixes the "@kinderthuisverplegingkempen.be" with the name selected from the drop down list.

    *********

    I should point out that you have two other places where you have email addresses:
    Code:
        <meta name="email" content="fb612666@skynet.be">
          <!--form action="fb612666/Sandra@kinderthuisverplegingkempen.be" method="post" ENCTYPE="text/plain"-->
    I would just REMOVE those two lines.
    Last edited by Old Pedant; 07-10-2013 at 12:37 AM.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,343
    Thanks
    11
    Thanked 589 Times in 570 Posts
    Quote Originally Posted by snuffel1309 View Post
    I have a 2 contactforms on a published website (www.kinderthuisverplegingkempen.be)?
    just rolls right off the tongue doesn't it. i hope you don't expect any mobile traffic, that domain won't physically fit in the url bar of my phone. i don't typically make off-topic comments, but man, you really should do something about that; i've heard 10 letters in the home page is too many, you have 30...
    Last edited by rnd me; 07-10-2013 at 04:34 PM.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •