We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18913
    • 654 Posts
    Hi,
    I need to be able to parse and send via email the fields in a form being filled out on Revo 2.2. The catch - I think - is that it is a form generated by some PHP and there is a varying number of one field (e.g. contestant_name1, contestant_name2, etc.)

    Not having worked with FormIt very much, I was wondering if there was a straightforward way to have all the fields in the form dumped to an email message? Or is there some other way entirely I should think about approaching this?

    Thanks in advance for any thoughts. I did look through the forums and nothing caught my eye as a solution.

    Regards,
    Matt
      • 39333
      • 151 Posts
      So you'd like the emailer template to be dynamic to account for these expanding fields if I understand correct.

      There may be advanced solutions beyond mine but the easiest way I can think is to build the template with up to X spots for the info to show up and if it doesn't they would just be empty.

      Are there going to need to be that many expanding slots? How many is max?

      You can't do JS in the email template so would have to be some kind of snippet that takes the place of the email templates formit uses, or one that can make a template selection process based on how many expanding fields.

      Again if it were me I'd just build a nice table email template and leave empty blocks for expansion. Not glamorous but if you only have a small number of expanding fields and there won't be dozens of entered names etc would work fine.
        MODX...the Zen of CMS
        "Bight off more than you can chew and keep right on chewing."
        • 18913
        • 654 Posts
        Quote from: eric.swd at Nov 12, 2012, 09:27 AM

        Again if it were me I'd just build a nice table email template and leave empty blocks for expansion. Not glamorous but if you only have a small number of expanding fields and there won't be dozens of entered names etc would work fine.

        Hi Eric,
        Thanks for the reply. Yes, you've basically got it right. And I think your approach might be the best one for the time being. First, though, I've got to deal with the URL parameters disappearing if a form fails validation. The email message is the lesser of my issues at the moment.
        Regards,
        Matt