Announcement

Collapse
No announcement yet.

How to create a Contact us form in the Shadows Template

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

    How to create a Contact us form in the Shadows Template

    We are have some difficulty creating a contact us form in the Shadows Template. We are using the code below but get an error message is red: "We are sorry, there was a problem processing your request". Oh - and no email is sent out to us to see.



    <mvt:item name="html_profile" />
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <base href="&mvt:global:basehref;">
    <mvt:if expr="NOT ISNULL l.settings:page:title">
    <title>&mvt:page:title;</title>
    <mvt:else>
    <title>&mvt:store:name;: &mvt:page:name;</title>
    </mvt:if>
    <mvt:item name="head" param="css_list" />
    <mvt:item name="head" param="head_tag" />
    </head>
    <body id="js-&mvte:page:code;" class="o-site-wrapper t-page-&mvt:global:pageClass;">
    <mvt:item name="hdft" param="global_header" />

    <section class="o-layout o-layout--column-reverse o-layout--row-reverse--l">
    <div class="o-layout__item u-width-12 u-width-9--l u-width-10--w">
    <section class="o-layout">
    <div class="o-layout__item">
    <h1 class="c-heading-delta u-text-bold u-text-uppercase">&mvte:page:name;</h1>
    <hr class="c-keyline">
    </div>
    </section>

    <section class="o-layout">
    <div class="o-layout__item">
    <mvt:item name="hdft" param="header" />
    </div>
    </section>

    <section class="o-layout">
    <div class="o-layout__item">
    <mvt:item name="readytheme" param="contentsection( 'contact_form' )" />
    </div>
    </section>

    <section class="o-layout">
    <div class="o-layout__item">
    <mvt:item name="hdft" param="footer" />
    </div>
    </section>
    </div>
    <aside class="o-layout__item u-width-12 u-width-3--l u-width-2--w">
    <mvt:item name="readytheme" param="navigationset( 'static_navigation' )" />
    </aside>
    </section>

    <mvt:item name="hdft" param="global_footer" />
    </body>
    </html>
    http://www.invinciblemusic.com

    #2
    This may help:
    Originally posted by Matt Zimmermann View Post
    Hi Everybody,

    Commencing with the next maintenance releases of Elements and Shadows, and included in all future ReadyThemes, I am happy to announce the official Contact Extension. The code, installation instructions, and demonstration links can all be found in the new Extension repository on GitHub: https://elements.mivareadythemes.com/contact-us.html . Let me know if you have any questions.
    See also https://www.miva.com/forums/forum/de...tus-page/page4

    and https://github.com/mivaecommerce/Extensions
    Sabine Sharp
    eCommerce Strategies & Solutions
    Glendale Designs
    Support Desk
    623.322.6066

    Comment


      #3
      Opps! Thanks for the heads up GDesigns. I see you linked that thread https://www.miva.com/forums/forum/de...tus-page/page4

      This already is addressing the issue and has my developer discussing it there as well. Can the moderator please delete this thread - its not needed. thx
      http://www.invinciblemusic.com

      Comment


        #4
        If you are going to implement a contact us form, consider implementing some type of CAPTCHA such as Google reCAPTCHA to significantly reduce the amount SPAM, especially when leveraged with strong eMail client Inbox rules.
        Thank you, Bill Davis

        Comment


          #5
          We are the developers behind invinciblerecordings :) I got it to work but only by downgrading the sendmail function to the previous one > sendmail(). The v9_sendmail() is returning only an error and never sends the email. I tested on a Miva hosted site and a host4less, always the same result > so not a server issue.

          Anybody out there who got it to work using the v9_sendmail function used at https://github.com/mivaecommerce/Extensions?
          Andreas Toman
          PCINET, LLC

          Miva Merchant Design, Development, Integration & Support
          We built over 200 Miva Merchant stores!
          Miva shopping cart design & integration service and see our Portfolio!


          e-mail: [email protected]
          web: www.pcinet.com
          LinkedIn: Andreas Toman
          phone: (786) 250-2056 (Miami, FL)

          Comment


            #6
            Are the sites hosted with an updated MivaScript engine?
            http://www.alphabetsigns.com/

            Comment


              #7
              Hey Dan! Yes, latest version 5.31 and Matt is already looking into it.
              Andreas Toman
              PCINET, LLC

              Miva Merchant Design, Development, Integration & Support
              We built over 200 Miva Merchant stores!
              Miva shopping cart design & integration service and see our Portfolio!


              e-mail: [email protected]
              web: www.pcinet.com
              LinkedIn: Andreas Toman
              phone: (786) 250-2056 (Miami, FL)

              Comment


                #8
                With Andreas' help, I was able to track down a couple of issues with the form processor which could arise if the site is using a third-party service as their mail server. Additionally, I have added a visitor confirmation email to the function to give the visitor a record that their message was received. The updated code can be found on GitHub: https://github.com/mivaecommerce/Ext...master/contact
                Matt Zimmermann

                Miva Web Developer
                Alchemy Web Development
                https://www.alchemywebdev.com
                Site Development - Maintenance - Consultation

                Miva Certified Developer
                Miva Professional Developer

                https://www.dev4web.net | Twitter

                Comment


                  #9
                  Originally posted by Matt Zimmermann View Post
                  With Andreas' help, I was able to track down a couple of issues with the form processor which could arise if the site is using a third-party service as their mail server. Additionally, I have added a visitor confirmation email to the function to give the visitor a record that their message was received. The updated code can be found on GitHub: https://github.com/mivaecommerce/Ext...master/contact
                  That's great. Though some store owners might want to consider a visitor confirmation notification message online versus a email should a form robot manages to get past human math challenge question.
                  Thank you, Bill Davis

                  Comment


                    #10
                    Hi Bill,

                    There is visual feedback on page as well. The robot would have to get past the math challenge, the honey-pot, and enable the form by either performing a touch or mouse action before it could send.
                    Matt Zimmermann

                    Miva Web Developer
                    Alchemy Web Development
                    https://www.alchemywebdev.com
                    Site Development - Maintenance - Consultation

                    Miva Certified Developer
                    Miva Professional Developer

                    https://www.dev4web.net | Twitter

                    Comment


                      #11
                      Originally posted by Matt Zimmermann View Post
                      With Andreas' help, I was able to track down a couple of issues with the form processor which could arise if the site is using a third-party service as their mail server. Additionally, I have added a visitor confirmation email to the function to give the visitor a record that their message was received. The updated code can be found on GitHub: https://github.com/mivaecommerce/Ext...master/contact
                      Question (perhaps rhetorical) - can this form be used on a Page other than the CTUS Page? I'm thinking it's just a matter of assigning the Resources to the Page other than CTUS?
                      Leslie Kirk
                      Miva Certified Developer
                      Miva Merchant Specialist since 1997
                      Previously of Webs Your Way
                      (aka Leslie Nord leslienord)

                      Email me: [email protected]
                      www.lesliekirk.com

                      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                      Comment


                        #12
                        Hi Leslie,

                        Yes, technically the form an be on any page as it calls the CTFM page for processing. You would need to modify the META refresh on CTFM to return to the page you are using if it is different than CTUS.
                        Matt Zimmermann

                        Miva Web Developer
                        Alchemy Web Development
                        https://www.alchemywebdev.com
                        Site Development - Maintenance - Consultation

                        Miva Certified Developer
                        Miva Professional Developer

                        https://www.dev4web.net | Twitter

                        Comment


                          #13
                          I can confirm this works - using the contact form on another page besides CTUS. I'm working on getting another contact form with different fields on another page. So far it runs and even sends a copy to the form submitter with the new custom field data. Next hurdle is the <mvt:do file="g.Module_Library_Utilities" name="g.sent" value="v9_SendEmail(l.mail)" /> which sends the form submit to the store email.

                          Does anyone know if this can be modified or duplicated and modified? Or perhaps I need to use something like <mvt:do file="g.module_library_utilities" name="g.email_sent" value="SendEmail(g.to_email,g.from_email,'',g.subj ect,'',g.message)" /> and include the new custom field variables in the action...
                          Last edited by Lasttimetryingtoregister; 04-23-19, 01:50 PM. Reason: Got a little farther.

                          Comment


                            #14
                            To add another contact form with different fields, I would recommend duplicating the CTFM page and making any changes there so you can keep a clear separation of functions.
                            Matt Zimmermann

                            Miva Web Developer
                            Alchemy Web Development
                            https://www.alchemywebdev.com
                            Site Development - Maintenance - Consultation

                            Miva Certified Developer
                            Miva Professional Developer

                            https://www.dev4web.net | Twitter

                            Comment


                              #15
                              Thanks Matt!

                              I have created a CTFMINFO page for processing based on CTFM as wells as a Ready Themes Content section. It all works fine including getting the new form field data into the confirmation email to the visitor which is carried in a variable called l.mail:title. In CTFMINFO I replaced the <mvt:do file="g.Module_Library_Utilities" name="g.sent" value="v9_SendEmail(l.mail)" /> with

                              <mvt:do file="g.module_library_utilities" name="g.sent" value="SendEmail(l.mail:to,g.store:email,'',l.mail :subject,'',l.mail:message)" /> and everything functions but the email to the store doesn't have the data from l.mail:title. I tried adding it to the above as:

                              <mvt:do file="g.module_library_utilities" name="g.sent" value="SendEmail(l.mail:to,g.store:email,'',l.mail :subject,'',l.mail:message,'',l.mail:title)" /> but the store notification email stops working.

                              Can you give any guidance on properly adding values to the value="SendEmail() in action? Or if there's any documentation for adding in new fields to the notification emails?

                              Comment

                              Working...
                              X