Hi, Our client uses Orbeon with email funcionality, where they have one email body for one form with replacement inside. You helped my colleague Piotr with this here: Now they ask if it's possble to have different email body (or part of body) based on variable in form. For example, we have variable in form NewSupplierForm $choosebody. If $choosebody = 1, then in email body we should have sentence: "Dear user, please fill your section", if $choosebody = 2, then in email body we should have sentence: "Dear user, please approve supplier" etc. Is it possible to achieve that? I attach email-form.xpl and resources.xml. With best regards Tomasz Marendowski You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Tomasz,
It seems that your `email-form.xpl` and `resources.xml` attachments didn't get through; could you try to attach them again in an answer to this message? Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex, Files attached. Tomasz W dniu niedziela, 29 lipca 2018 00:04:23 UTC+2 użytkownik Alessandro Vernet napisał: Hi Tomasz, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Tomasz,
Thank you for the `email-form.xpl`. I see you're selecting a different body based on the app (e.g. `NewSupplierForm`). The XSLT where you do this also has access for the form data, with `$data` pointing to the root element, i.e. the `<form>` element. I imagine that in your previous message you're referring to a control named `choosebody`. In that XSLT, you can't refer to the value of that control as `$choosebody`, but instead need to look up the name of the section it is in (say that section is called `internal`), and then you can get the value of the control in XSLT with `$data/internal/choosebody`. You'll let me know if this helps. Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
This post was updated on .
Hi Alessandro
I think that Tomasz described not correctly problem of our customer. We are able to get proper mail subject and body based on the form (app) name. But we are not able to get any values entered on the form to be in the mail body. I've described the problem as detailed as possible. I also attached email-form.xpl and resources file with changes marked today's date (2018-08-13) Piotr Wieczorek email-form.xplresources.xmlDescription_of_the_issue.docx |
Files attached.
-- W dniu poniedziałek, 13 sierpnia 2018 20:23:31 UTC+2 użytkownik Piotr Wieczorek napisał: Hi Alessandro You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. ORBEON.zip (384K) Download Attachment |
Administrator
|
In reply to this post by PiotrW
Hi Piotr,
I understand that you not only want to choose the template based on the app/form, but also want to replace "placeholders" in the template by values from the form. My earlier message <http://discuss.orbeon.com/Dynamic-email-body-based-on-variable-in-form-tp4663753p4663772.html> was addressing this very question. In that light, does my previous message help? And of course, just let me know if I'm misunderstanding what you're trying to do, or if you've encountered some issue doing what I was suggesting in that message. Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Hi Piotr,
Did you get a chance to try updating your XSLT to replace placeholders in the template with values coming from the form data (from `$data`, in your case)? If so, did it work for you? Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex
I just returned from sick leave. I read your answer and it seems that we were talking about the same issue - to replace placeholders at mail body with form data. I will try to test your proposed solution this week and come back to you with my findings. Piotr -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Got it Piotr, you'll let us know how it works.
Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alessandro
Just to inform you that I've managed to enhance email-form.xpl to replace some parts of email body with data retrieved from form. In some cases it requires some additional condition checking (i.e you receive some value from checkbox but would like to have some meaning in the body) but works fine. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Piotr,
Excellent, I am glad you managed to make all the changes you needed to `email-form.xpl`. Also, in case I haven’t mentioned this before, 2018.1 will come with some of those features build-in, so you’ll be able to create a template directly from Form Builder: Alex On Sep 4, 2018, 11:43 AM -0700, PiotrW , wrote:
-- Hi Alessandro You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |