Finally then,... here it is, eForm 1.4.4(beta) This is an imterim release with suggested changes and additions from the forums
I’d like it to be tested before it goes into the repository so attached is a minimal zip file. No documentation update, just three core files.
Installation instructions:
1. Extract zipped files into assets/snippets/eform/ (replacing existing files, so backup if you need to)
2. In the manager open the eForm snippet and replace content with eform.1.4.4.snippet.tpl
3. Test, test, test
4. Curse me, praise me or feed me back
Changes in 1.4.4
- Fixed various Select box inconsistencies
- Adjusted email validation expression to allow + character.
- Line breaks in ’Html’ fields will only be replaced in report template if &sendAsText false!
- Line breaks in ’Html’ fields will be replaced in thankyou template when &sendAsText is true
- removed double semicolon on line 201
- Properly display session hash name in debug text for &protectsubmit code
- properly escape regular expression in form parser
- Fixed 0 (zero) values not being processed in form parser for validating selectboxes
- Fixed ambiguous variable naming in validation code
- Enhanced efLoadTemplate to also allow snippets as templates
- &invalidClass now also works for vericode field
- Added &autoSenderName parameter
- Added &runSnippet parameter - expects a snippet name. Snippet will be run before any eForm handling. Any return value from the snippet is discarded. This can be used to insert functions as an alternative to declaring a separate snippet in the document. One parameter, the &formid will be passed to the snippet. Sadly eForm will silently ignore a snippet that does not exist due to the way $modx->runSnippet handles snippet return values.
- Added $lang[’ef_mail_error’] to the language file and a slightly improved error reporting when sending mail fails (which just happened to me)
Let me know if I’ve missed anything and enjoy breaking things
EDIT: Updated zip file to final version (complete with exception of language files - please grab it and post translations in this thread)
Some additional changes:
- Added &snipFolder parameter for those that want to keep different versions of eform in different folders.
- Date formatting for report can now be set in language file: $_lang[’ef_date_format’]
- Report output is now more locale aware as far as numbers are concerned. Added $_lang[’ef_thousands_separator’] to the language file. If set to an empty string (default) the character defined in the current (php) locale will be used (if any).