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

  • Matt Zimmermann
    replied
    Hi Leslie,

    If you are referring to the refresh in case of error, you would need to add any fields you want to have refilled into the URL string.

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by lesliekirk View Post

    Hmmm, okay... I "think" I understand. Sounds like it may get messy...
    Thanks Matt - I was able to get past that part with only a few "errors". What about the meta http-equiv="refresh" URL?

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    Hi Leslie,

    There shouldn't be a reason why you can't have multiple fields in in your form, you will just have to modify the send function.
    Hmmm, okay... I "think" I understand. Sounds like it may get messy...

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    There shouldn't be a reason why you can't have multiple fields in in your form, you will just have to modify the send function.

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    Hi Leslie,

    Beyond looking into the LSK for more information on the v9_SendEmail function, this is the best I can recommend for now.


    Ahhh, so this isn't quite ready to replace the EmporiumPlus Contact Manager multi-field contact form ability?

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    Beyond looking into the LSK for more information on the v9_SendEmail function, this is the best I can recommend for now.

    Originally posted by Matt Zimmermann View Post
    I would recommend trying to concatenate the title into the mail message and still use the v9_SendEmail function:
    Code:
    <mvt:assign name="l.mail:message" value="'Message from: ' $ g.contactName $ g.eol $ g.eol $ 'Title: ' $ g.title $ g.eol $ g.eol $ 'Email Address: ' $ g.contactEmail $ g.eol $ g.eol $ 'Message:' $ g.eol $ g.contactMessage" />

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Lasttimetryingtoregister View Post
    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?
    I need to add 6 additional fields to the CTUS form that I have been able to add to a ReadyTheme other than Shadows. A how-to doc for this would really make it easy to move away from the EmporiumPlus Contact Manager.



    Leave a comment:


  • lesliekirk
    replied
    Originally posted by William Davis View Post
    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.
    Do you have a CTUS form that uses reCAPTCHA? I have encountered one that has the code for reCAPTCHA in the CTUS template but it looks like something has not been set up correctly because the form can be submitted with checking the reCAPTCHA checkbox.

    Leave a comment:


  • Lasttimetryingtoregister
    replied
    That did the trick: a separate contact form running on another page with a custom field with the data value in the notification email. Thanks so much for your time and help!
    Now I just need to build out the custom fields and code them into the form and processing page.

    Leave a comment:


  • Matt Zimmermann
    replied
    I would recommend trying to concatenate the title into the mail message and still use the v9_SendEmail function:
    Code:
    <mvt:assign name="l.mail:message" value="'Message from: ' $ g.contactName $ g.eol $ g.eol $ 'Title: ' $ g.title $ g.eol $ g.eol $ 'Email Address: ' $ g.contactEmail $ g.eol $ g.eol $ 'Message:' $ g.eol $ g.contactMessage" />

    Leave a comment:


  • Lasttimetryingtoregister
    replied
    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?

    Leave a comment:


  • Matt Zimmermann
    replied
    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.

    Leave a comment:


  • Lasttimetryingtoregister
    replied
    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.

    Leave a comment:


  • Matt Zimmermann
    replied
    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.

    Leave a comment:


  • lesliekirk
    replied
    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?

    Leave a comment:

Working...
X