Dynamic email body based on variable in form

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic email body based on variable in form

martom.ipcc
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].
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic email body based on variable in form

Alessandro  Vernet
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
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic email body based on variable in form

martom.ipcc
Hi Alex,
Files attached.
Tomasz

W dniu niedziela, 29 lipca 2018 00:04:23 UTC+2 użytkownik Alessandro Vernet napisał:
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: <a onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;" href="http://discuss.orbeon.com/" target="_blank" rel="nofollow">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].

resources.xml (241K) Download Attachment
email-form.xpl (34K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic email body based on variable in form

Alessandro  Vernet
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
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic email body based on variable in form

PiotrW
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

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic email body based on variable in form

PiotrW
File added


--
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].
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic email body based on variable in form

martom.ipcc
In reply to this post by PiotrW
Files attached.

W dniu poniedziałek, 13 sierpnia 2018 20:23:31 UTC+2 użytkownik Piotr Wieczorek napisał:
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)

--
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