I am trying to make a custom email form using Doc2Form. Everything works, except the part where I try to insert the pageName of the current page in the subject and the message.
I'm not familiar with doc2form, but this looks okay. Maybe you're supposed to just send the [#pageName] as a macro parameter, without the rest of the string?
Ove... try moving all your email template logic into a dictionary item... i have noticed some goofiness when trying to put all your output for the email text into the macro itself... certain characters tend to break things.
here is a snippet of syntax i have used in a dictionary item.... this is using fields from the form itself... just using bracket syntax...
Dear [regNameWebinar],
Thank you very much for registering for our free webinar: [CourseTitleWebinar] on [CourseSessionWebinar]. You should receive an email one week prior to the scheduled webinar that will include a link to the site and audio conference dial-in information. If you should not receive this information or should have any...
and here is a snippet from my macro insertion...
ResponseSubject="Thank you for Registering for [CourseTitle]..." ResponseMessage="#courseEmail" ResponseEmailFieldAlias="regEmail" ResponseCopyTo="[email protected]" UseAjax="0" FormSubject="Course Registration for [CourseTitle]" DefaultValueDocs="[#pageID]"
of course... none of these are using umbraco properties... except for the defaultValueDocs...
It seems the problem is either in Doc2Form or in the way Umbraco handles those macro parameter values.
The problem is at least possible to solve in Doc2Form, so I have added a few changes to the Doc2Form source code. It now supports passing a value from the current page (like [#pageID]), passing a value from the request collection (like [@querystringkey]) as well as passing a cookie value (like [%cookiekey]).
This is only running on locally on my server at the moment, but I will merge my changes to Codeplex when I get a better internet connection (and access). :-)
Page name in subject and message does not work
I am trying to make a custom email form using Doc2Form. Everything works, except the part where I try to insert the pageName of the current page in the subject and the message.
Here is the macro:
And here is the resulting email:
Anyone have a clue why it does not work?
I am successfully using the [#pageID] in the ChooseWhereToStore parameter in another form on my website.
I'm not familiar with doc2form, but this looks okay. Maybe you're supposed to just send the [#pageName] as a macro parameter, without the rest of the string?
Yes. It works when only using [#pageName] as parameter value.
Maybe I need to dig into the Doc2Form source code to fix this issue...
Maybe it's possible on the other end to concat some strings (or better yet, string.Format them or something like that)?
Ove... try moving all your email template logic into a dictionary item... i have noticed some goofiness when trying to put all your output for the email text into the macro itself... certain characters tend to break things.
@bob Tried that now. Didn't work. [#pageName] and [#pageID] are still not replaced by the proper text.
@Ove...
here is a snippet of syntax i have used in a dictionary item.... this is using fields from the form itself... just using bracket syntax...
Dear [regNameWebinar],
Thank you very much for registering for our free webinar: [CourseTitleWebinar] on [CourseSessionWebinar]. You should receive an email one week prior to the scheduled webinar that will include a link to the site and audio conference dial-in information. If you should not receive this information or should have any...
and here is a snippet from my macro insertion...
ResponseSubject="Thank you for Registering for [CourseTitle]..." ResponseMessage="#courseEmail" ResponseEmailFieldAlias="regEmail" ResponseCopyTo="[email protected]" UseAjax="0" FormSubject="Course Registration for [CourseTitle]" DefaultValueDocs="[#pageID]"
of course... none of these are using umbraco properties... except for the defaultValueDocs...
hope this gets you a bit closer to what you want.
It seems the problem is either in Doc2Form or in the way Umbraco handles those macro parameter values.
The problem is at least possible to solve in Doc2Form, so I have added a few changes to the Doc2Form source code. It now supports passing a value from the current page (like [#pageID]), passing a value from the request collection (like [@querystringkey]) as well as passing a cookie value (like [%cookiekey]).
This is only running on locally on my server at the moment, but I will merge my changes to Codeplex when I get a better internet connection (and access). :-)
This problem is solved with changeset 52448.
http://umbracoext.codeplex.com/SourceControl/changeset/changes/52448
is working on a reply...