We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13115
    • 15 Posts
    Hey -

    Is it possible to use PHx in an eForm? I’ve got some fields that only need to be sent to the email recipient if a checkbox is marked, and I was hoping to use something like:
    [+currentlySubscribed:isnot=``:then=`
    <p><strong>Address:</strong></p>
    <p>
    [+address1+]<br />
    [+address2+]<br />
    [+city+], [+state+] [+zip+]
    </p>
    `+]
    

    to accomplish it. If that won’t work, can someone point me in the right direction for something that will work?
      • 7231
      • 4,205 Posts
      No. I don’t think eForm plays nice with PHx (if I remember correctly). To do what you describe you would need to use php in a function tied to an eForm event
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 13115
        • 15 Posts
        Bummer. Any pointers on how to do that? (good forum threads, documentation, etc.? I didn’t see much for examples in the docs I could find...)
          • 16610
          • 634 Posts
          Take a close look at eForm events example: assets/snippets/eform/docs/eform_example_events.htm (eForm docs are bundled with the snippet)
            Mikko Lammi, Owner at Maagit
            • 13115
            • 15 Posts
            Found it -- thanks. Any idea if PHx and eForm will ever play well together? Seems like it could be used pretty powerfully, though I know it probably wouldn’t be a very easy job.