We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31950
    • 21 Posts
    GetServer is not working for me. I followed the wiki and a forum post. I checked for typo’s and etc..

    Snippet is called "getServer"

    <?php
    function getServer( &$fields ){
    // remote_addr
    $fields[’remote_addr’]=$_SERVER[’REMOTE_ADDR’];
    $fields[’remote_host’]=$_SERVER[’REMOTE_HOST’];
    $fields[’user_agent’]=$_SERVER[’HTTP_USER_AGENT’];
    //return success
    return true;
    }
    ?>




    My Form chunk is setup like this.


    <h1>Get a Free Web Design Quote Today!</h1>
    Fill out the form below and we will be in touch soon
    [!getServer!]
    [!checkfield!]
    [!eForm?
    &amp;formid=`websiteform`
    &vericode=`1`
    &amp;to=`removed this so i dont get indexed for spam`
    &amp;tpl=`websiteform`
    &amp;report=`WebsiteFormReport`
    &amp;thankyou=`WebsiteFormThanks`
    &amp;subject=`Open Source CMS Quote/Purchase Request`
    &eformOnValidate=`checkfield`
    &amp;gotoid=`46`
    !]

    Report chunk below.

    <p>This is a Request for Quote sent by <b>[+name+]</b> using the Request a Quote form on the Clicked Solutions website. </p>

    <p>Name: [+name+]</p>
    <p>Last-Hidden-Name: [+LastName+]</p>
    <p>Email: [+email+]</p>
    <p>Company: [+company+]</p>
    <p>Phone: [+phone+]</p>
    <p>Domain: [+domain+]</p>
    <p>Message:
    [+message+]</p>
    <p>IP: [+remote_addr+]</p>
    <p>Host: [+remote_host+]</p>
    <p>User Agent: [+user_agent+]</p>
    <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE: Request for Quote">[+email+]</a></p>


      • 31950
      • 21 Posts
      Ok i missed something, this is why i am not a programmer lol.

      &amp;eformOnBeforeMailSent=`getServer`
      at the top of my call.

      It works now.