Re: prevent pdf from being sent to success page

Posted by Erik Bruchez on
URL: https://discuss.orbeon.com/prevent-pdf-from-being-sent-to-success-page-tp4114768p4122063.html

Ethereal,

> *Question 1)* Is there a way to configure this somehow, so that the email
> body contains the summary (same data as on the summary page)?

Out of the box, no: the email text is statically defined. For
reference, here is the code in charge of sending the email:

https://github.com/orbeon/orbeon-forms/blob/master/src/resources/apps/fr/email/email-form.xpl

> One possible solution would be to attach a pdf with the emails, which seem
> to contain same data as on the summary page.
> I can get the pdfs attached by changing this line from our
> properties-local.xml
> <property as="xs:boolean" name="oxf.fr.email.attach-pdf.*.*" value="false"/>
> from false to true.
> But now the success page won't work as it seems that the data is sent for
> the success page in a pdf-file also (and it can't parse it by default)!?

I thought we had fixed this issue a while back, but apparently not!
For historical reasons, let's say, when a PDF is generated, instead of
sending the form data, the PDF URL is sent to the confirmation page.

> *Question 2)* How do I prevent FR from sending the pdf to success page, but
> include it with the email?
>
> I found one possible solution (hack) for this too. I could use the
> pdf-extraction-processor on the success page:
> http://dl.lib.brown.edu:8083/ops/doc/processors-pdf-extraction
> But since the pdf emailed does not contain the hidden fields from the forms,
> I would suspect that neither will the pdf sent for the success page, so I
> haven't even tried this option yet.

I don't think that would work! Easier would be to patch
persistence-model.xml to prevent sending the PDF URL to the success
page. This is the line that does it at this time:

https://github.com/orbeon/orbeon-forms/blob/master/src/resources/apps/fr/includes/persistence/persistence-model.xml#L636

Removing the condition and always send
xxforms:instance('fr-form-instance') should work.

> Then one more thing we would like to be able to do is to specify the email
> body (or pdf) contents completely in the form created with the Orbeon Form
> Builder (just to select some specific information to display in the
> email/pdf).
>
> *Question 3)* There is an option "Show in Summary" with the form fields. If
> I leave this unselected I would expect that the information is not included
> on the summary page nor in the pdf generated for the email, yet there it is.
> Is this a bug?

This options controls whether the field shows in the summary page, so…
it should definitely not show in the summary page, but it has nothing
to do with PDF generation.

> *Question 4)* Also if there is a hidden field on the form and I select the
> option "Show in Summary" for it, I would assume it would be then shown on
> the summary (and pdf). But it is not. Is this also a bug?

It should show in the summary page.

> There is one more thing we may need to do with the emails. This is to send
> distinct emails for the customer and for the customer services.
> For this I found an older posting from which I understood that this isn't
> possible.
> (Putting this info here just as a note.)
>
> *Question 5)* Just checking if this this is still true that there is no way
> to send two distinct emails from a single form (made with form builder)?

If the addresses are statically defined, you can set them in the
oxf.fr.email.to.*.* property:

http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties/configuration-properties-form-runner#TOC-Email-settings

> The solution for all our problems would be using "hand made" xforms
> applications, maybe with some custom Java servlets... Something I could live
> with...
> Unfortunately our regular (to-be) Orbeon users have limited technical
> skills, thus trying to teach them to use xforms may be a bit too much (not
> even to speak about making Java services). Therefore it would be nice if
> there would be some way to accomplish these things right from the Orbeon
> Form Builder.

It seems that what you want to do consists mostly of incremental
improvements or fixes to Form Builder/Form Runner, so it would be a
shame to reinvent the world instead.

-Erik


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws