Announcement

Collapse
No announcement yet.

Hidden Fields In Emails?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hidden Fields In Emails?

    Hi everyone, just a quickie (hopefully!).

    I've been following the instructions of a kb article here to add a custom field to the Contact Us Form.

    The reason being, we have several sites (6 live atm with more planned) and basically all the emails are received to the same email address, regardless of the site.

    So, this leaves us with a problem, because unless the customer drops us some kind of hint in their email, we can't really tell which site the email has come from.

    This made me think about the possibility of including a hidden field within the contact us form, and sending the value of the field along with the rest of the email contents.

    I have been through the instructions in the kb article several times, and still manage to get an error ("The server encountered an internal error or misconfiguration and was unable to complete your request.") when I try to load the Contact Us page after uploading the new MailForm.pl. Change it back to the original and the page loads fine.

    So, is it even possible to pass the contents of a hidden field into the email, or am I just making a really simple mistake in the code somewhere? Or am I trying to get too complicated and there's an easier way of doing what I want?

    I have tried to search to forum but couldn't find anything regarding passing hidden fields...

    I'm on v9.0.3 IMMA if it helps.

    Edited MailForm.pl code attached.

    Thanks in advance
    Attached Files
    Last edited by KB2; 22-Mar-2010, 11:55 AM. Reason: Updating kb links
    Need a barcode label or card printer? Look no further than OnlyZebra.

    Thinking about barcode scanning and whether it could improve your business' efficiency? We can offer a range of products from numerous manufacturers. OnlyAML, OnlyIntermec, OnlyLXE, OnlyOpticon & OnlyPsion or OnlyRugged, the one stop shop for all your needs.

    #2
    The reason being, we have several sites (6 live atm with more planned) and basically all the emails are received to the same email address, regardless of the site.
    if you have 6 sites presumably at 6 different urls then the contact form should send to the address in business settings - this should be unique for each url. i would approach the problem from this angle rather than faffing with the contact form

    Comment


      #3
      Originally posted by pinbrook View Post
      if you have 6 sites presumably at 6 different urls then the contact form should send to the address in business settings - this should be unique for each url. i would approach the problem from this angle rather than faffing with the contact form
      They do.

      support@insertsitenamehere.com

      But, we've used a distribution list to make sure all emails are picked up in case someone is on holiday. The emails received just show the distribution group name in the sender field, and not the individual email address the email was sent to.

      If that makes sense
      Need a barcode label or card printer? Look no further than OnlyZebra.

      Thinking about barcode scanning and whether it could improve your business' efficiency? We can offer a range of products from numerous manufacturers. OnlyAML, OnlyIntermec, OnlyLXE, OnlyOpticon & OnlyPsion or OnlyRugged, the one stop shop for all your needs.

      Comment


        #4
        i would still be looking at the way the email is redistributed within your office.

        Comment


          #5
          Originally posted by pinbrook View Post
          i would still be looking at the way the email is redistributed within your office.
          Ok, thanks
          Need a barcode label or card printer? Look no further than OnlyZebra.

          Thinking about barcode scanning and whether it could improve your business' efficiency? We can offer a range of products from numerous manufacturers. OnlyAML, OnlyIntermec, OnlyLXE, OnlyOpticon & OnlyPsion or OnlyRugged, the one stop shop for all your needs.

          Comment


            #6
            The Kb article is rather complicated for what you want to do.

            Rather than create a hidden variable, pass it to the script, add in the code to get the value, etc would it not be easier to just use an existing variable such as $::g_sWebSiteUrl ?

            i.e just use this

            $sTextMailBody .= "site:" . $::g_sWebSiteUrl . "\r\n";
            Mike
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment


              #7
              Thanks Mike, I'll give it a go and let you know how I get on

              Edit: Fantastic, so simple too. Thanks a lot!

              Nicola
              Need a barcode label or card printer? Look no further than OnlyZebra.

              Thinking about barcode scanning and whether it could improve your business' efficiency? We can offer a range of products from numerous manufacturers. OnlyAML, OnlyIntermec, OnlyLXE, OnlyOpticon & OnlyPsion or OnlyRugged, the one stop shop for all your needs.

              Comment

              Working...
              X