Send Multilingual xslt transformed email when Submitted?
Unfortunately, the XSLT tranformation for Contour doesn't happen through the regular Umbraco methods, so it seems that I can't use dictionary items when sending an xslt transformed email.
Is there a way in which I can create some kind of an XSLT extension for this? Or am I stuck with having to create the same form for each language?
1. The subject of the e-mail does not fetch a dictionary item when I use the hash notation 2. The default "Send email when Submitted" workflow item doesn't use the dictionary, so our site owner gets contact mails with a lot of hashtags
One of my forms is not sending an XSLT transformed e-mail. The normal "Send email when Submitted" works fine, so it's not an SMTP problem. There is absolutely no error logging anywhere. How am I supposed to know what went wrong?
You should get an entry in the log if the workflow fails to execute, are you sure the workflow settings are correct (sending to the correct email address) ?
Ah, good catch! I have to change it to {#formLabelEmail} now since that label has changed. Would be good to have an error when the {} notation can't find that particular field.
Oh by the way, I just noticed that I'm using [@something] in the subject of one of the e-mails, I suppose it won't be difficult to make that work in dictionary items, but I just wanted to point that out so you won't forget.
One more issue with this: in the normal "Send email when Submitted" workflow item, it doesn't send the translated prevalues for dropdowns, I just get the "#valueName", so it looks like that doesn't do a dictionary look-up.
By the way, I can't remember where I your XSLT sample for sending transformed e-mails from, but the values also need to be translated when they start with a hash, I'm using tables but the idea is the same:
The choose block is what I had to add to make transformed mails work properly.
The only problem you might have here is that people might enter a # (maybe that's even required) as the first character in an input box. In that case you will need to explicitly add a condition on the test in the "when", to exclude that field by name.
Send Multilingual xslt transformed email when Submitted?
Unfortunately, the XSLT tranformation for Contour doesn't happen through the regular Umbraco methods, so it seems that I can't use dictionary items when sending an xslt transformed email.
Is there a way in which I can create some kind of an XSLT extension for this? Or am I stuck with having to create the same form for each language?
Comment author was deleted
Checking the issue now
Comment author was deleted
Just tested it on a 4.5.1 install and it worked fine, here is my xslt
It doesn't output the dictionary item value in preview mode but it does work fine when the form is on a page.
What version of umbraco are you running ? Because I think there might have been a change to how the dictionary item is fetched in 4.5
Comment author was deleted
Sorry, in preview mode it also fetches the dictionary item value (based on the backoffice culture)
Comment author was deleted
Also if you used a dictionary item for your field caption, you can also get the value in the transformed mail
So
Becomes
Comment author was deleted
Just tested and it also works on 4.0.4.2
Excellent, it didn't work because of... Namespaces of course!
This helped:
Thanks Tim!
I'm running into two problems here:
1. The subject of the e-mail does not fetch a dictionary item when I use the hash notation
2. The default "Send email when Submitted" workflow item doesn't use the dictionary, so our site owner gets contact mails with a lot of hashtags
Oh, one more:
One of my forms is not sending an XSLT transformed e-mail. The normal "Send email when Submitted" works fine, so it's not an SMTP problem. There is absolutely no error logging anywhere. How am I supposed to know what went wrong?
Comment author was deleted
Hi Sebastiaan,
You should get an entry in the log if the workflow fails to execute, are you sure the workflow settings are correct (sending to the correct email address) ?
Ah, good catch! I have to change it to {#formLabelEmail} now since that label has changed. Would be good to have an error when the {} notation can't find that particular field.
Are the other issues in your backlog now? :-)
Comment author was deleted
Ah didn't spot those before, will add those to our issue tracker and should be part of the next maintenance release
Excellent! :-D
Oh by the way, I just noticed that I'm using [@something] in the subject of one of the e-mails, I suppose it won't be difficult to make that work in dictionary items, but I just wanted to point that out so you won't forget.
Comment author was deleted
Looks like an easy update, just fixed the issues,
If you download the latest _update zip here (the one from today): http://nightly.umbraco.org/Umbraco%20Contour/1.1.3%20WIP/
and simply replace your umbraco.forms.core.dll it should work
Thanks! I'll check it out right now.
Works perfectly, I'm a very happy man right now, thanks again!!
Comment author was deleted
Great! Glad I could help ;)
One more issue with this: in the normal "Send email when Submitted" workflow item, it doesn't send the translated prevalues for dropdowns, I just get the "#valueName", so it looks like that doesn't do a dictionary look-up.
Comment author was deleted
Should be fixed if you upgrade to the latest nightly of the work in progress version http://nightly.umbraco.org/Umbraco%20Contour/
(you'll just need to replace the Umbraco.Forms.Core.dll)
Works perfectly!
I think I've just tested everything that can be translated, glad to be a tester with such a responsive developer! ;-)
Comment author was deleted
Great, thanks for your input ;)
By the way, I can't remember where I your XSLT sample for sending transformed e-mails from, but the values also need to be translated when they start with a hash, I'm using tables but the idea is the same:
The choose block is what I had to add to make transformed mails work properly.
The only problem you might have here is that people might enter a # (maybe that's even required) as the first character in an input box. In that case you will need to explicitly add a condition on the test in the "when", to exclude that field by name.
Actually, you should do the same choose block for the field caption to make it generic! So it would become:
is working on a reply...