Announcement

Collapse
No announcement yet.

Adding Contact Us Fields In V8

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

    Adding Contact Us Fields In V8

    Hi all........
    I've read how to add contact us fields in v7 - but i've upgraded to V8 and wonder if anyone knows how to do this in V8?

    Thanks
    Andy

    #2
    See page 76 (Section C -> Adding Extra Fields to the 'Contact Us' Form) of the Advanced users guide, available from:

    http://www.actinic.co.uk/support/downloads.htm

    Comment


      #3
      Thanks isolve
      Done most of it but can't find the bit at 15
      "a little further down you should see the above line again - under"

      I remember this code was repeated in the mailform.pl in V7 and i have compared the two files. I can't find it!

      I have also tried the edited (working) file from my site in v7 but this doesn't work in v8.

      Please see attached txt file
      Attached Files

      Comment


        #4
        Andy,

        This works for me...
        Adding Extra Fields to the 'Contact Us' Form
        To create new fields in the 'Contact Us' form you need to:

        1. Go to the 'Design' tab in the 'Select Page Type' drop-down list select 'Contact Us'.
        2. Click on one of the prompts on the page (e.g. 'Message') to select the 'Contact Us Bulk Area' layout.
        3. Add a new row where you want the field to display using the following
        code:
        <tr>
        <td>&nbsp;</td>
        <td>My New Field Name:</td>
        <td><input type="text" name="MyNewField" size="50" maxsize="125" value="" /></td>
        </tr>

        4. If the field is to be required then change the field prompt to look
        like:
        <td><span class="actrequiredcolor">My New Field Name:</span>*</td>
        5. Save and close the file
        You now need to edit the Perl script that controls the message sending.
        6. Open 'Windows Explorer' and browse to C:\Program Files\Actinic v8\Sites\<site name>
        7. Open 'MailForm.pl' in a text editor such as Notepad.
        8. Search for: 'sub SendMailToMerchant'
        9. You should see the following line:
        # Receive parameters from input hash
        #
        my ($sEmailRecpt, $sSubject, $sTextMailBody, $sName, $sMessage, $sHTML);
        10. Add in $sMyNewField, so it looks something like
        # Receive parameters from input hash
        #
        my ($sEmailRecpt, $sSubject, $sTextMailBody, $sName, $sMessage, $sMyNewField, $sHTML);
        11. You need to create a variable for each extra field that you want to
        display so after :

        $sSubject = $::g_InputHash{'Subject'};

        add a similar line for each field, for example:

        $sMyNewField = $::g_InputHash{'MyNewField'};

        12. Then search for: '# Construct the mail text and send it to the merchant'
        13. You need to add a line for each field after:

        $sTextMailBody .= ACTINIC::GetPhrase(-1, 2373) . "\r\n" . $sMessage . "\r\n\r\n";

        for example:

        $sTextMailBody .= "MyNewFieldName:" . $sMyNewField . "\r\n";

        14. Then directly after these new fields you should see:

        my @Response = ACTINIC::SendMail($::g_sSmtpServer,
        $$::g_pSetupBlob{EMAIL}, $sSubject, $sTextMailBody, $sEmailRecpt);

        15. You need to add in your new variables so they are sent with the email, for example:

        my @Response = ACTINIC::SendMail($::g_sSmtpServer,
        $$::g_pSetupBlob{EMAIL}, $sSubject, $sTextMailBody, $sEmailRecpt, $sMyNewField);

        16. A little further down you should see the above line again - under:

        # Send the same message to the sender
        # With a "thank you" prefix

        17. Make the same change
        18. If you want to make your new field to be required then you need to search for:

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

        19. Copy this code and paste it directly after it and change the relevant
        parts, i.e.:

        if ($sMyNewField eq "")
        {
        $sError .= "<b>'My New Field'</b> is required<br>";
        }

        20. Save and close the file and update your site.
        Actinic is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.
        Kind regards,
        Bruce King
        SellerDeck

        Comment


          #5
          Hi Bruce

          I followed this up to the point of "Click on one of the prompts on the page (e.g. 'Message') to select the 'Contact Us Bulk Area' layout."

          I can not get to the contact us layout. All i have in the lower window is the code <a href="<actinic:variable name="SendMailPageLink" />" target="_self" onmouseover="SwapImage('nav_contact','button_contact_highlight.gif')" onmouseout="RestoreImage()"><img src="button_contact.gif" alt="<actinic:variable name="SendMailText" />" border="0" name="nav_contact" /></a>

          I think i am missing something obvious here, i edited a layout the other day but not sure how, i have looked in the library and can not find it there?

          Help needed
          Cheers
          Darren

          Comment


            #6
            Its OK

            Sorted it now

            Not having a good day, maybe i should leave this until Monday? Cant see the wood from the trees

            Cheers
            Darren

            Comment


              #7
              Hi Bruce

              Thanks Bruce.......But

              The line below isn't in the Actinic Version 8 sites.
              Is it a case of simply omitting this bit of code?

              Thanks
              Andy

              16. A little further down you should see the above line again - under:

              # Send the same message to the sender
              # With a "thank you" prefix

              Comment


                #8
                Andy - I can confirm that the line you mention is not in the MailForm.pl file for v8. I'll get the Advanced User Guide updated. For now, just skip that step in the exercise.

                Comment


                  #9
                  Not getting anywhere with this aaargggggggggggg!

                  I've edited the mailform.pl script and added one extra filed for the 'contatc us' page.

                  I am using Actinic Version 8.

                  I have attached the mailform.pl to this post.
                  I have also added the code below to the 'contact us' page.

                  The contact us page isn't validating the 'Telephone' field if it's left empty and the telephone number isn't being sent in the email.

                  This is driving me nuts - I've checked and re-checked the code.

                  Does anyone have a working copy of the MailForm.pl with extra fields for ACTINIC VERSION 8?

                  Thanks
                  Andy

                  <tr>
                  <td>&nbsp;</td>
                  <td><span class="actrequiredcolor">Telephone Number: *</Span></td>
                  <td><input type="text" name="Telephone" size="50" maxsize="125" value="" /></td>
                  </tr>

                  Comment


                    #10
                    forgot to add the script
                    Attached Files

                    Comment


                      #11
                      forgot to add the script

                      Comment


                        #12
                        Hi Andy

                        I have a working script for V8

                        Check here and let me know if this is what you want and i can send you both layout and mailform script

                        http://kitesrus.co.uk/cgi-bin/mf9000...CTION=SHOWFORM

                        it does not have the telephone number in it but as long as you repeat what is already there in both the contact us form and script it should be OK, mind you if i get a chance later i will add the phone number to it.

                        Cheers
                        Darren

                        Comment


                          #13
                          Hi Andy

                          Try these 2 files, obviously change the extension but these work for me, i have also added the phone number aswell

                          Cheers
                          Darren

                          Comment


                            #14
                            Ooops try again
                            Attached Files

                            Comment


                              #15
                              THANKS to Darren

                              I will try these file later and report back

                              Thanks for taking the time.

                              Regards
                              Andy

                              Comment

                              Working...
                              X