We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32645
    • 377 Posts
    I have a project which requires pages (called "Featured Projects") where the following happens;


    "All featured projects should be able to have a contact form. So far only one page has needed one. Any project that decides to have a contact form should be able to specify the contact details to appear, and somewhere we need to be able to set where the alert email goes.

    This would also apply to all future projects. So, this is a custom form with custom fields and custom email alerts -- a bit like a wizard.

    But before I go off into the deep end about it...

    I’m wondering - has anyone tried a custom form with custom email alerts and custom fields that is linked per page before? As I’m not really sure how to resolve this problem without making all forms generic.

    If there is an easy way to get around this, I’d love to hear it.

    Thanks.


      • 3749
      • 24,544 Posts
      It’s an interesting problem. I don’t think you’ll find an "easy" way to do it. You could probably use eForm and eForm2DB to create a form with checkboxes for each field you want in a particular contact form and a field for the email address, then save that as a profile. Then you’d use that profile and eForm to display the appropriate contact form.

      Another way would be to use TV’s for the design form and a custom snippet to show it and save the info. Then another custom snippet to display each appropriate contact form and send the email.

      I’m not sure which would be easier. I would probably use the second just because it’s more pleasant for me to work with my own code than somebodey else’s.

      Bob
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 32645
        • 377 Posts
        Okay,

        Thanks for your help -- I will investigate further, and hopefully clarify any points with the client to make sure that’s what they’re after.

        Thanks for your help.