How to support file upload in web-form Liferay 7?
Asked Answered
G

1

7

I need a simple extension for Liferay web form to enahance file attachment to data flled in a liferay 7 web form.

Also need to sent this file as an attachment with the email to the registered user.

I know how to achieve this functionality in liferay 6.2 but not about liferay 7. I am using liferay 7 GA-5 CE.

Any help appreciated.

Gardia answered 25/4, 2018 at 6:4 Comment(2)
Do you mean the web form portlet or just in portlets in general?Atonic
web-form portletGardia
L
4

You need to create a custom form field type plugin, please find liferay wiki here Creating Form Field Type. and follow below steps,

  1. Change input type to file in soy file path is

    src/main/resources/META-INF/resources/your-plugin-type-name.soy

  2. Create a fragment of dynamic.data.list.form.web bundle and override display/view.jsp to accept the file i.e. multipart data.
  3. Override AddRecordMVCActionCommand action command to store the selected file as you required.
  4. Build and deploy all 3 plugins

Hope this will help you.

Literacy answered 3/5, 2018 at 15:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.