2

I've created a new custom form in Liferay DXP EE. I would also like to modify and create a custom formatting for how the email is sent. The current email displays the for label then has a line break and then shows the enter value below it like so:

•   Form Label 1
Form value 1
•   Form Label 2
Form value 2

I would like it to display as follows:

•   Form Label 1: Form value 1    • Form Label 2: Form value 2

I would like the form results to display 2 form labels and values per line.

Is it possible to change the formatting like this? What do I need to modify to do this?

juzraai
  • 5,693
  • 8
  • 33
  • 47

1 Answers1

2

You need to modify the "form_entry_add_body.soy" template file inside the web form portlet, but since it's not jsp we can not create a fragment file to override this soy file.

However you can create your own custom DDLFormEmailNotificationSender class and register with high service ranking and use modified template from there. There is a challenges to register this class because it's private class so you need to follow this blog.

I tried to solve this way but i could not, have a look at this liferay forum post so i have used dirty hack.

Hope this will help you.

Dipti Ranparia
  • 570
  • 5
  • 17
  • So I'm not using a portlet I'm using Liferay 7 out of the box form wysiwyg. – Chris Padavick Jul 17 '18 at 18:48
  • Yes, it's Liferay OOTB functionality, but if you want to change the formatting you need to override "form_entry_add_body.soy" template through approach mentioned in the above answer. – Dipti Ranparia Jul 23 '18 at 12:04