Announcement

Collapse
No announcement yet.

Change Contact Us to Newsletter Subscription Form

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

    Change Contact Us to Newsletter Subscription Form

    I dont use the Contact Us form in many of my designs so with V8 code being a little easier to get at I am trying to convert the contact us page into a basic newsletter subscription form. I have got so far see:
    http://www.hunterspuddings.co.uk/cgi...CTION=SHOWFORM

    I am no expert with scripts so HELP!

    What is needed now is to add a subscribe/unsubscribe radio button, change the field names so that they match the titles, change the reply email subject heading to "Newsletter" and make only the email field required.

    If it is possible then this would be good for the AUG as an option and improve V8 marketing capabilities.

    #2
    I decided to apply my vast Perl programming knowledge to the task and have found a way to do this. Please find attached an edited MailForm.pl file (zipped up) for you to copy to your Site1 folder.

    Basically all I did was add two custom fields to the email called 'Subscribe' and 'Surname' using the instructions in the advanced user guide. I then customised the 'Contact Us Bulk Area' layout to look as follows:
    Code:
    <form method="post" action="<Actinic:Variable Name="SendMailPageURL"/>">
    <input type="hidden" name="RANDOM" value="<actinic:variable name='Random'/>" />
              
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
       <!-- Hidden field when in trial mode -->
       <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
    </actinic:block>
    
    <actinic:variable Name="ValidationError"/>
    <input type="hidden" name="Subject" value="Newsletter" /> 
    <table cellpadding="3" cellspacing="0">
       <tr> 
          <td width="15">&nbsp;</td>
          <td colspan="2">
             <strong><Actinic:Variable Name="MailFormHeader"/></strong><br /> 
             <br />
          </td>
       </tr>
       <tr> 
          <td>&nbsp;</td>
          <td>
             Forename
          </td>
          <td>
             <input type="text" name="Name" size="50" value="<Actinic:Variable Name="MailFormNameValue"/>" /> 
          </td>
       </tr>
         <tr> 
          <td>&nbsp;</td>
          <td>
             Surname
          </td>
          <td>
             <input type="text" name="Surname" size="50" value="" /> 
          </td>
       </tr>
       <tr> 
          <td>&nbsp;</td>
          <td>
             
          </td>
          <td>
             Subscribe: <input type="radio" checked="checked" name="Subscribe" value="yes" /><br />
             Unsubscribe: <input type="radio" name="Subscribe" value="no" />
          </td>
       </tr>
       <tr> 
          <td>&nbsp;</td>
          <td>
             <span class="actrequired"><Actinic:Variable Name="MailFormEmail"/> *</span>
          </td>
          <td>
             <input type="text" name="EmailAddress" size="50" value="<Actinic:Variable Name="MailFormEmailValue"/>" /> 
          </td>
       </tr>
       <tr> 
          <td valign="top">&nbsp;</td>
          <td valign="top">
             Country: 
          </td>
          <td>
             <input type="text" size="50" name="Message" value="<Actinic:Variable Name="MailFormMessageValue"/>" />
          </td>
       </tr>
       <tr> 
          <td valign="top">&nbsp;</td>
          <td valign="top">&nbsp;</td>
          <td>
             <input type="submit" name="ACTION" value="<Actinic:Variable Name="MailFormSendButton"/>" />
          </td>
       </tr>
       <tr> 
          <td valign="top">&nbsp;</td>
          <td colspan="2" valign="top">
             <Actinic:Variable Name="RequiredFields"/> <span class="actrequired"><Actinic:Variable Name="Highlighted"/></span>.
          </td>
       </tr>
    </table>
    
    </form>
    Then go to Design Text and change field ID 2370 to 'First Name' and 2373 to 'Country'.

    Good luck!
    Attached Files

    Comment


      #3
      Hi Chris, Many thanks for that. I saw the info in the V7 user guide but did not know if it would work for V8 - too much room for error with my typing skills!. I will definately be using it on many sites.

      Comment


        #4
        Works a treat - well worth adding to the the AUG I think.

        Comment


          #5
          Glad you got it working OK. I was rather pleased to get that Perl working (took a few goes...). I'll add it to the AUG.

          Comment


            #6
            cdicken,

            my site is unitedherbs.co.uk

            is it possible to have "Contact Us" and this "script" co-exist on one site?
            If so, how do i do it pls?

            vincent
            Vincent
            United Herbs

            Comment


              #7
              Hi Vincent

              This isn't possible I'm afraid. The changes will permenantly add the new fields to the 'Contact Us' page.

              You need to maybe look at getting hold of a custom script for doing newsletter subscriptions and then put the <form> code in your overall (outer) layout that you are using for your store design.

              Comment


                #8
                chris,

                i am new to actinic, how do you get to the "contact us" page source code? so that i can do some testing etc.

                for example, adding extra option fields, selection fields, radio button etc.

                vincent
                Vincent
                United Herbs

                Comment


                  #9
                  Hi there - have you got the Advanced User Guide yet? Step 1 says...

                  1. Go to the 'Design' tab in the 'Select Page Type' drop-down list select 'Contact Us'.

                  Comment


                    #10
                    Originally posted by cdicken
                    Hi there - have you got the Advanced User Guide yet? Step 1 says...

                    1. Go to the 'Design' tab in the 'Select Page Type' drop-down list select 'Contact Us'.
                    hi chris,

                    pls accept my apology, i mean the actual raw source code, not actinic pre-defined script.

                    can u help?

                    cheers
                    vincent
                    Vincent
                    United Herbs

                    Comment


                      #11
                      are you asking for the perl script?

                      if so mailform.pl

                      Comment


                        #12
                        Originally posted by pinbrook
                        are you asking for the perl script?

                        if so mailform.pl
                        jo, chris,

                        it could well be - i will need to investigate further over the next couple of day.

                        many thanks for the pointer, will let you guys know how it turn out.

                        vincent
                        Vincent
                        United Herbs

                        Comment


                          #13
                          This certainly does work a treat and has helped me out no end..

                          But one thing....

                          Upon completing a test for both subscribe and unsubscribe, it doesn't say whether or not the person emailing you in signing up or wanting to be removed - can this be addressed?

                          Comment


                            #14
                            Peter,

                            Apologies for the delay in getting a reply. Do you not get a value of 'Yes' or 'no' come throught with the email.

                            Kind regards,
                            Bruce King
                            SellerDeck

                            Comment


                              #15
                              Bruce, thanks for your response. The same reply comes back from both emails...

                              SUBSCRIBE TEST

                              First Name:Test
                              Email Address: pete@ultimate-av.co.uk
                              Country:
                              UK

                              UNSUBSCRIBE TEST

                              First Name:Test2
                              Email Address: pete@ultimate-av.co.uk
                              Country:
                              UK

                              There are no yes' or no's in the emails at all...

                              Thanks

                              Comment

                              Working...
                              X