We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15308
    • 25 Posts
    That’s what I’ve done with the following chunk :
    <style type="text/css">
    h1 {color:red;}
    </style>
    <h1>This is the Formit Email Chunk.</h1>  
    <br />[[+name]] ([[+email]]) Wrote: <br />  
    [[+text]] 
    


    My goal is to have a long chunk with some HTML tags that needs to be styled (h1-h6, p, a, ul, li). Of course, I can declare CSS styles for each tag individualy but a better solution would be to separate the chunk content from the CSS styles.
      • 30319
      • 406 Posts
      Quote from: kamalito at Aug 17, 2010, 08:55 AM

      That’s what I’ve done with the following chunk :
      <style type="text/css">
      h1 {color:red;}
      </style>
      <h1>This is the Formit Email Chunk.</h1>  
      <br />[[+name]] ([[+email]]) Wrote: <br />  
      [[+text]] 
      


      My goal is to have a long chunk with some HTML tags that needs to be styled (h1-h6, p, a, ul, li). Of course, I can declare CSS styles for each tag individualy but a better solution would be to separate the chunk content from the CSS styles.

      Try this:
      Make new style sheet: email_chunk.css, throw in all the styles you want.
      Declare in chunk: <style type="text/css" href="style.css">.
      Test/experiment etc. with email clients etc.

      HTH Tom
        • 15308
        • 25 Posts
        Thanks for your reply Tom.
        It’s not a good practice to use an external css file within an HTML email; most email clients will ignore it.

        For now, I’ll use inline CSS attributes. For those who are concerned with CSS styling of HTML emails, a good tool can be found here : http://premailer.dialect.ca/ . It converts CSS styles to inline styles attributes, relative paths are converted to absolute paths and CSS properties are checked against e-mail client capabilities.
          • 30319
          • 406 Posts
          Quote from: kamalito at Aug 17, 2010, 09:20 AM

          Thanks for your reply Tom.
          It’s not a good practice to use an external css file within an HTML email; most email clients will ignore it.

          OIC, I did not know that, I never send html emails, thank you also for posting the link. smiley
            • 5340
            • 1,624 Posts
            There are some email clients(e.g. google) that will ignore some css properties like background-image, margin negative and more.
            Make sure you test your email with the most popular clients out there.
              • 30319
              • 406 Posts
              What is the correct way to use this parameter??

              &emailFromName=`[[+fi.name]]` does not work, nor does &emailFromName=`[[+name]]`, nor does &emailFromName=`name`

              Added emailReplyToName and emailReplyTo properties for email hook...

              What is the correct way to use the cc and bcc parameters??

              Added bcc and cc properties for email hook

              Is there any sample code which shows how to use $scriptProperties[’fields’][’name’];??
              This is the way to grab the form fields’ values to echo them back on the redirect page??
              How can I set &emailFromName equal to $scriptProperties[’fields’][’name’];

              Thank you, Tom
                • 37514
                • 178 Posts
                How do I adapt this to a drop down?

                <label for="subject">
                Subject:
                <span class="error">[[+fi.error.subject]]</span>
                </label>
                <input type="text" name="subject:required" id="subject" value="[[+fi.subject]]" />

                The example in the add-on MODx sample site doesn’t quite work:

                <label for="cfRegarding">Regarding:
                <span class="invalidValue">[[+fi.error.regarding]]</span>
                </label>
                <select id="cfRegarding" name="subject:required">
                <option value="General Inquiries">General Inquiries</option>
                <option value="Press">Press or Interview Request</option>
                <option value="Partnering">Partnering Opportunities</option>
                </select>

                Thank you!

                Jim

                  • 1778
                  • 659 Posts
                  You should add a value for your select

                   <select id="cfRegarding" name="cfRegarding:required" value="[[+fi.cfRegarding]]">
                              <option value="General Inquiries">General Inquiries</option>
                              <option value="Press">Press or Interview Request</option>
                              <option value="Partnering">Partnering Opportunities</option>
                          </select>
                  
                  


                  Hope this helps
                  cheers
                    • 37514
                    • 178 Posts
                    Thank you, that now allows me to place

                    [[+subject]]


                    into the template chunk, but:

                    &emailSubject=`[[+subject]]`


                    Returns:
                    Subject: [[+subject]]

                    (I also tried &emailSubject=`[[+subject]] with the same result.)

                    Is this right or is there a way of inserting the email subject from the form into the email subject line itself?

                    Thank you

                    Jim
                      • 30319
                      • 406 Posts
                      A major/glaring/uncorrected weakness of this addon is its inability to pass form values to anything but the email chunk.
                      Also the field names seem to be hard-coded into the addon, but I haven’t proven this yet.
                      This is why my post asks several questions about fields etc. usage, to which the addon developer has not responded.
                      Thank you, Tom