Marking field as email recipient not working inside section template

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

Marking field as email recipient not working inside section template

mabu
Hi,

I want to use the standard email button/process for sending emails to an email address entered in an input field. Therefore I used the form builder to mark an input field as email recipient. In general this works fine.
But I have the scenario where the email address input field is inside a section template. In this case sending emails does NOT work. Orbeon Error log: "No recipient addresses".

A simple example:
form.xml
global_library.xml

Martin                                                                                        
Reply | Threaded
Open this post in threaded view
|

Re: Marking field as email recipient not working inside section template

Alessandro  Vernet
Administrator
Hi Martin,

Strange, I was unable to reproduce this, both with a form I first created and then with your exact form. To test sending emails, I just used the "email" button, which I added to  the oxf.fr.detail.buttons.*.* property, e.g.: <property as="xs:string"  name="oxf.fr.detail.buttons.*.*" value="validate summary clear send pdf save-final email review"/>. Maybe you're sending the email in a different place? Does it work for you with the email button?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Marking field as email recipient not working inside section template

mabu
Hi Alex,

I customized the send process and there I call the email process at the end. I also tried it with the standard email button but it does not work inside a section template.
If I look into your code at https://github.com/orbeon/orbeon-forms/blob/master/src/resources/apps/fr/email/email-form.xpl#L161-162 then I think it can not work, because the xpath expression searches inside the xh:body element for a element with a class "fr-email-recipient". And in case of a section template the input fields are not located under the xh:body element. The section template is defined as xbl component under the xh:head element.

So I am wondering that it worked for you!?

Martin
Reply | Threaded
Open this post in threaded view
|

Re: Marking field as email recipient not working inside section template

Alessandro  Vernet
Administrator
Hi Martin,

Ah, yes, now I see the problem. I had <property as="xs:string"  name="oxf.fr.email.to.*.*" value="…"/> set in my properties-local.xml, so it would of course use that email instead of the one in the form. Now I get the error, and I created an issue for this. Since this is somewhat of a corner case, I can't really say when it will be fixed, but we'll make sure to post an update in this thread when it is.

https://github.com/orbeon/orbeon-forms/issues/2016

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Marking field as email recipient not working inside section template

Erik Bruchez
Administrator
This issue is now fixed:

    https://github.com/orbeon/orbeon-forms/issues/2016

-Erik