Hiya,
I’ve been working on my first website using Modx and so far I love it,
However I’ve been trying to get eForm to work on a bookmark tab, you click to bookmark information and it paginates in a drop down div using ditto. The user then has the option to type in a email address and have the bookmarked information sent to their own email address.
Can anyone point me in the right direction please?
Thanks in advanced
Pete.
[!eForm? &tpl=`bookmarkForm` &sendirect=`1` &formid=`email`!]
This is what I’ve got so far, so &sendirect=`1` will send the email to the email address thats been typed into form id="email".
How do I get it to send the information from [!bookmarkedItems!]
Thanks,
Pete.
would i use &report=`[!bookmarkedItems!]` ?
-
☆ A M B ☆
- 24,524 Posts
You would need to use a custom snippet/function to work with eForm’s eFormOnBeforeMailSent event, and the function would call
$fields['bookmarks'] = $modx->runSnippet('bookmarkedItems');
then you can use [+bookmarks+] in your eform report tpl.
At least that’s the general idea; you may have to fiddle with your snippet to get the output just the way you want.
Thanks sottwell, I’ll give that ago. Is the [!eform? &sendirect=`1` part correct?
-
☆ A M B ☆
- 24,524 Posts
If it works, it’s correct.
nope it isn’t working =[
Wouldn’t the bookedmarkedItems snippet need to be in the form for the form to process it?
-
☆ A M B ☆
- 24,524 Posts
No. If it’s working correctly in the function, its return value will be inserted into the $fields array to be used by eForm in generating the report. Try having the snippet return something obvious, like
and see if that doesn’t get inserted into the report. Then work on getting it to return what you want.
thanks i’ll give that a wiz