Never write an email form report from scratch again!
If you're a programmer you probably get the request to create a form that sends an email somewhere. Writing forms is probably the task I hate doing the most because it can be so tedious. There's the initial form creation, the validation, and finally the email template to stick the data into and send off. With MODx and eForm, the first two steps are made easier, but the last step still took me forever if the form was really long or complex.
Well, on the last form I created I decided to write a helper script that would get me at least 95% there, and this program is where I ended up. All you have to do is paste in your form code and if all of the options are selected it will spit out a table of form names as MODx placeholders, or with PHP echo tags. All I have to do now is insert the correct labels, rearrange the data a bit, and put it in a chunk for eForm to mail. This script will probably take an hour out of my custom form development time. Go ahead, give it a try (leave praise or bugs you find in the comments of this post):
This program marks the first entry into the new DEVTRENCH tools section. I have a lot of little scripts like this that do functions I hate to do. I love doing these because 1) I love to solve problems, and 2) I love figuring out ways to produce things faster.
Enjoy