Announcement

Collapse
No announcement yet.

Email Button - Contact Form

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

    #16
    Hi i have done a simular thing, How do i set the message box as not required?
    www.polymax.co.uk/acatalog/ number 1 for for o-rings, rubber seals, rubber cords. In Viton NBR and silicone.
    Cuddle And Carry, Baby Slings Wraps Ringslings Pouches and Carriers
    http://www.oringen.eu/ O-Ringen Rubber Koord Uitegdreven Profielen in Nitrile (NBR) Viton.

    Comment


      #17
      Hi James,

      Browse to your site folder via Windows Explorer (e.g. C:\Program Files\Actinic v7\Sites\Site1). Open MailForm.pl with notepad.

      Search for:

      if ($sMessage eq "")
      {
      $sError .= ACTINIC::GetRequiredMessage(-1, 2373);
      }

      Comment it out like this:

      #if ($sMessage eq "")
      # {
      # $sError .= ACTINIC::GetRequiredMessage(-1, 2373);
      # }

      Save the script.

      Open up Act_ContactUs.html with notepad from within your site folder.

      Look for:

      NETQUOTEVAR:MESSAGE

      Comment it out and add the text "Message":

      <!-- NETQUOTEVAR:MESSAGE--> Message


      Reason for this is I think the formatting for the required text is coming from the C++ code.

      Hope this helps.
      Regards,

      Toby Blanchard

      Comment


        #18
        Required Field

        Hello,
        Can anyone help me, I've read this post and managed to add some extra fields in "Act_Contactus.html" & alter "MailForm.pl". These work fine but they are not "required fields" so a user can omit them if they like.
        I'd like to make the new fields required, do I alter/add to the
        $sTextMailBody .= "newfield: " . $::g_InputHash{'newfield'} . "\r\n";
        in the mailform.pl.
        I presume there is more code to be added elsewhere, but I'm not sure what or where if anyone can help me?
        Regards
        Rob
        ILUVM Wholesale Silver Jewellery
        http://www.iluvm.co.uk
        http://www.the-free-directory.co.uk

        Comment


          #19
          Rob,

          Just looking at Toby's post immediately above yours, the Mailform.pl content that makes "Message" a required field is
          Code:
          if ($sMessage eq "")
          {
          $sError .= ACTINIC::GetRequiredMessage(-1, 2373);
          }
          so logic says that to make your new fields required, you would find that section of code and add a duplicate for each new field you want 'Required'

          Code:
          if ($sMyNewField eq "")
          {
          $sError .= ACTINIC::GetRequiredMyNewField(-1, 2373);
          }
          Make a backup of mailform.pl and give it a try - let us know if it works.
          Bill
          www.egyptianwonders.co.uk
          Text directoryWorldwide Actinic(TM) shops
          BC Ness Solutions Support services, custom software
          Registered Microsoft™ Partner (ISV)
          VoIP UK: 0131 208 0605
          Located: Alexandria, EGYPT

          Comment


            #20
            mailform.pl

            I've tried some different variations on this but still can't get the fields to be required, all I keep managing is turning page into a 500 error!

            I've added to make "Street" required
            if ($sStreet eq "")
            {
            $sError .= ACTINIC::GetRequiredMessage(-1, 2374);
            }
            And
            $sTextMailBody .= ACTINIC::GetPhrase(-1, 2374) . $sStreet . "\r\n";
            I have tried different figures (-1, 3000); or (-1, 2500);
            But can't seem to get fields required?
            Regards
            Rob
            ILUVM Wholesale Silver Jewellery
            http://www.iluvm.co.uk
            http://www.the-free-directory.co.uk

            Comment


              #21
              The text for the perl variable 'GetRequiredMessage' IS set in Design Text Phase=-1 ID=2373 - changing that number will not work,

              [I am sorry - I should NOT have put that GetRequiredMyNewField in there - it should stay exactly as it is in the previous snippet.]

              Code:
              if ($sStreet eq "")
              {
              $sError .= ACTINIC::GetRequiredMessage(-1, 2373);
              }
              You have added sStreet to the variable list further up in Mailform? Variables need to be declared first, then assigned a value when the page is read and then validated.
              Bill
              www.egyptianwonders.co.uk
              Text directoryWorldwide Actinic(TM) shops
              BC Ness Solutions Support services, custom software
              Registered Microsoft™ Partner (ISV)
              VoIP UK: 0131 208 0605
              Located: Alexandria, EGYPT

              Comment


                #22
                mailform.pl

                This perl scripting has fried my brain, I have adjust as below

                if ($sStreet eq "")
                {
                $sError .= ACTINIC::GetRequiredMessage(-1, 2373);
                }
                then a bit below

                $sTextMailBody .= ACTINIC::GetPhrase(-1, 2373) . $sStreet . "\r\n";
                This causing 500 error
                Regards
                Rob
                ILUVM Wholesale Silver Jewellery
                http://www.iluvm.co.uk
                http://www.the-free-directory.co.uk

                Comment


                  #23
                  V7 guide

                  I found instructions in V7 advanced guide and followed these to the letter to make my "Street" field required.

                  Have lost the 500 error now but getting another fault (as below) when form is sent
                  Error returned from SMTP server (3: 5.0.0
                  Any ideas?
                  I have uploaded a txt copy of my mailform.pl
                  Attached Files
                  Regards
                  Rob
                  ILUVM Wholesale Silver Jewellery
                  http://www.iluvm.co.uk
                  http://www.the-free-directory.co.uk

                  Comment


                    #24
                    Working

                    I have this working now but I had to omit some stages of the instructions in V7 advanced guide.

                    I left out stages 13 to 16 of the guide which was to add my new field "$sStreet" to two lines of code. I'm not 100% sure what this line was supposed to do but it seems to works now?
                    My field is now required, form will not send if field is left blank and I receive confirmation through e mail with correct information when form is sent.

                    Thanks for your help Bill
                    Regards
                    Rob
                    ILUVM Wholesale Silver Jewellery
                    http://www.iluvm.co.uk
                    http://www.the-free-directory.co.uk

                    Comment


                      #25
                      merchant email

                      Hello,

                      Where would I edit the mail script if i want the mail form on contact us to go to a different email address than the default sent in Business settings?
                      Raymond Allen
                      GraphicBiz
                      ----------------------------------------
                      GraphicBiz: www.graphicbiz.co.uk
                      Order Rubber Stamps Online: www.custom-stamps.co.uk

                      Comment


                        #26
                        Hi Raymond

                        Please try this and see if it helps

                        1. Open mailform.pl(usually found in C:\Program Files\Actinic v7\Sites\site...) with a text editor like notepad

                        2. Search for 'ACTINIC::SendMail', you will see...

                        my @Response = ACTINIC::SendMail($::g_sSmtpServer,
                        $$::g_pSetupBlob{EMAIL}, $sSubject, $sTextMailBody, $sEmailRecpt);if
                        ($Response[0] != $::SUCCESS) {
                        ACTINIC::RecordErrors($Response[1], ACTINIC::GetPath());
                        $sError = $Response[1];
                        }

                        3. Replace '$$::g_pSetupBlob{EMAIL}' with the desired email
                        address in single quotes e.g.

                        @Response = ACTINIC::SendMail($::g_sSmtpServer, 'name@email.com',
                        $sSubject, $sTextMailBody, $sEmailRecpt);

                        4. Once this done uplaod your site to effect the changes online.
                        Kiran Chandran
                        Technical Support - SellerDeck
                        http://www.sellerdeck.co.uk/

                        Further help can also be found at http://community.sellerdeck.com/forumdisplay.php?f=27

                        Comment

                        Working...
                        X