We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30223
    • 1,010 Posts
    Finally had some time to add the bits and pieces suggested in the various forum topics. Before I post it in the repository I’d like a few people to test and comment on the changes...


    Update 11 December 2006
    eform 1.4.2 has now been added to the repository There are some extra additions which are listed below


    • New: validation message placeholder no longer requires wrapping elements - You should now just use [+validationmessage+]
      instead of <div clas="error">[+validationmessage+]</div> (or similar)
      You can use the $_lang[’ef_validation_message’] in your eform language file to format
      the message. Add [+ef_wrapper+] to this variable where you want the messages to appear
    • New: You can now place the anywhere in your document (outside the form template)
    • New: Support for in-line validation alert via the new &requiredClass and &invalidClass parameters
    • New: Email character set now follows the modx setting (thanks to Gildas)
    • Update: Tweaked the sessionVars parameter so it’s no longer sensitive to spaces in comma seperated values
    • Update: Changed the date validation due to php version differences (Raymond Irving)
    • New: &css parameter - Adds css to the head of the document when the form is displayed
    • New: &jscript parameter - Adds javascript to the head of the document when form is displayed
    • New: eForm now checks for version differences between snippet and eform.inc.php
    • New: &protectSubmit parameter - protect against multiple submits of similar form data
      values: 0=off, 1=use required fields, or comma separated list of fields to compare
    • New: &submitLimit parameter - Time limit in minutes on successive submits of same form
    • works standalone or in combination with &protectSubmit - see documentation for details

    And a bit more info on the new parameters:

    &cssStyle
    Adds a style declaration to the <head> section of the page when either the form is displayed or the thank you page is displayed (if the &thankyou parameter is set). Values can be a combination of paths, full urls, chunk names and doc id’s.
    Examples:
    [!eForm &cssStyle=`assets/site/forms.css,chunkName` ... !]
    [!eForm &cssStyle=`chunkName` ... !]
    [!eForm &cssStyle=`http://mysite.com/assets/styles/forms.css` ... !]


    Chunks (and documents if a doc id is given) can return a values in the form of:
    an inline style block, eg. <style type="text/css">/*some styles*/</style>
    a link to stylesheet(s), eg. <link href="assets/site/forms.css" rel="stylesheet" type="text/css">
    a comma separated list of urls, eg. assets/site/forms.css,assets/site/more.css,assets/site/gone_overboard.css

    &jScript
    Similar to &cssStyle but for adding javascript to the <head> of the page document. Currently Javascript is only added when the form is displayed.

    &protectSubmit - defaults to 1 (on)
    Protects against submitting a form multiple times with the same data. Submitting the form becomes disabled after the first successful submit while the value from key form fields remains the same. This is achieved by setting (and comparing) a session variable with an md5 hash from these key fields. Which fields are compared depends on the value of &protectSubmit. Possible values are 0 (off), 1 (all ’required’ fields are used) or you can set a comma separated list of field names. To ensure that the session variable works separatedly for different forms the session variable name is based on the &formid paramter ({formid}_hash).

    &submitLimit - off (0) by default
    Enforces a time limit (in minutes) between form submits. After the form has been submitted successfully it can not be submitted again for the set amount of minutes irrespective of the form data being changed. When used in combination with &protectSubmit &submitLimit takes precedence, meaning that when the time limit has expired the form can be submitted again regardless of the setting of &protectSubmit (it will unset the session variable). As with &protectSubmit this parameter uses a session variable with a variable name based on &formid.

      • 32963
      • 1,732 Posts
      Very nice work here Tobyl. Will test soon.
        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
      • Like I say here eForm is a great tool. Thanks a lot Tobyl. But wink I use UTF-8 encoding in my development, and in this context I had to add this line before sending any mail :

        $mail->CharSet = $modx->config[’modx_charset’];

        Could you add something like this in a future release ?
          Ackwa - Web Design & Development agency | Tours - France | Follow me on Twitter...
          • 30223
          • 1,010 Posts
          eForm 1.4.2 has now been added to the repository. See first post
          • Very nice work, thanks a lot... I wil test it ASAP.
              Ackwa - Web Design & Development agency | Tours - France | Follow me on Twitter...
            • Thanks TobyL ... now resolves all issues that I was having. laugh
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 17802
                • 190 Posts
                Toby, you rule! grin
                Thanks, all of my issues with eForm appear to have been resolved as well smiley
                  Thanks for MODx - I love it!
                  • 30223
                  • 1,010 Posts
                  Blij dat ik je van dienst kon zijn Maaike grin
                  (Glad to be of service) smiley
                  • Quote from: TobyL at Nov 22, 2006, 03:51 PM


                    Update 11 December 2006
                    eform 1.4.2 has now been added to the repository There are some extra additions which are listed below

                    Awesome news, Toby!

                    So, any word on whether CC emailing is working yet? 1.4.2 is the best eForm yet wink


                    - Support for CC and BCC fields

                    BTW, Thank you, thank you, thank you!!


                    This form was already submitted succesfully. There is no need to submit your information multiple times.
                      Mike Reid - www.pixelchutes.com
                      MODx Ambassador / Contributor
                      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                      ________________________________
                      Where every pixel matters.
                      • 30223
                      • 1,010 Posts
                      So, any word on whether CC emailing is working yet? 1.4.2 is the best eForm yet

                      Just came accross this in the phpmailer documentation:


                      AddBCC (line 315)

                      Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
                      void AddBCC (string $address, [string $name = ""])

                      * string $address
                      * string $name

                      Same for CC. This may be the problem you’ve been experiencing... Big setback.