We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29201
    • 239 Posts
    Can anyone provide and example of this? My chunk is just spitting out the code instead of the form. I have tried changing the cache settings. I believe this is possible using an additional snippet? Would rejoice if a working example could be provided.

      • 29201
      • 239 Posts
      Looks like I'm able to call eform from within a chunk! I've changed the call from [! to [[ ... but when I try to drop variables inside the chunk that eform uses for the form I get nothing.
        • 13226
        • 953 Posts
        Can you be more precise with your question ?

        I use eForm pretty much solely via chunks - but I don't fully understand your question

        If my understanding is correct, you want to call the snippet via a chunk - stupid question maybe - why ?

        You can call the form directly in the content field.

        Uncached:
        [!eForm? &formid=`Contact` &subject=`[+subject+]` &to=`[(emailsender)]` &tpl=`Contact` &report=`ContactReport`!]
        
        Cached:
        [[eForm? &formid=`Contact` &subject=`[+subject+]` &to=`[(emailsender)]` &tpl=`Contact` &report=`ContactReport`]]

        If the page itself is cached call the snippet uncached

        If the page is uncached, call the snippet how you wish as the page will be (re)rendered every time it's called [ed. note: iusemodx last edited this post 8 years, 11 months ago.]
          • 29201
          • 239 Posts
          Quote from: iusemodx at May 05, 2015, 10:44 PM

          If my understanding is correct, you want to call the snippet via a chunk - stupid question maybe - why ?

          I'm calling eform via chunk because I need to pass a variable into the form. Specifically, I need to pass the address of a property into an input field so that the user doesn't have to type it in. This address is dynamic based on the property page that they are viewing.


            • 13226
            • 953 Posts
            I am by far no eForm expert, but I have managed to get all of my forms working to date smiley

            Have you got this working now ?

            Is the value you need a preset TV per page / ID ?

            Can you post your eForm call + chunks etc. ?

            Not so long ago I was stuck trying to get page titles and other info from child pages, so I came up with this

            It may or may not help your situation.
              • 29201
              • 239 Posts
              I was able to make some progress on this as seen here:

              http://forums.modx.com/thread/97099/eform-validation-removes-my-dynamic-variable#dis-post-525240

              no my issue is the eform validation clears out the dynamic value that gets set for my property address.