2

I'm using Liferay 7 CE. Following the Liferay steps to create a new form field type using Liferay IDE (New Liferay Module Project - Gradle - Project Template Name: form-field), I need to create a new field type to upload a file (with this saving in Documents and Media) and send it in an email. In this case, the input file is necessary to create a form "Work with us" with upload curriculum file, with sending and saving it, in addition to basilar available fields (Name, Message, ..).

I don't find some examples or similar projects to this, and in the latest release of Liferay (GA6), there isn't this field type yet. How do I do to make it?

This is the link to the guide: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/creating-form-field-types

Thank you

VC1
  • 1,660
  • 4
  • 25
  • 42
Marco
  • 147
  • 9
  • What kind of field are you trying to add? There is already a field that you can use to upload files to DML. – Miroslav Ligas Apr 05 '18 at 18:15
  • This type of field will be available in the next version of Liferay. You can see the code for it here: https://github.com/rbohl/liferay-portal/tree/master/modules/apps/forms-and-workflow/dynamic-data-mapping/dynamic-data-mapping-type-document-library – Russ Bohl Apr 05 '18 at 20:15
  • @MiroslavLigas the kind of field that I'm trying to add is the file. Where can I find the field to upload files to DML that you're saying ? I need to add this field into the form. – Marco Apr 06 '18 at 10:23
  • @RussBohl Yes, I 've already seen that but 2 weeks ago it was released the latest version of Liferay (7 GA6) but it doesn't include this field type.. Do you know about when will it be released ? Thanks – Marco Apr 06 '18 at 10:27
  • @Marco No I don't think it will make it into the current version. I'd expect this field to be released with 7.1. However, you might be able to use the src form the master branch to build it for 7.0. – Russ Bohl Apr 09 '18 at 14:13
  • @RussBohl Ok, thank you for help! – Marco Apr 09 '18 at 14:59
  • 1
    @Marco if you stil looking for the answer see this post, https://stackoverflow.com/questions/50015048/how-to-support-file-upload-in-web-form-liferay-7/50159185#50159185. I had similar porblem and i have a created a new web form field file type. – Dipti Ranparia May 12 '18 at 09:21
  • @Dipti I've just followed the first 2 steps without problems, but how can I do the last step (override AddRecordMVCActionCommand) ? Have you got a code sample? – Marco May 15 '18 at 09:49
  • @Marco, yes i do have a sample, your email?, you can also try how override MVCRenderActionCommand. – Dipti Ranparia May 16 '18 at 06:27
  • @Dipti my email is mangialavori.marco@gmail.com , thanks. – Marco May 16 '18 at 07:09

0 Answers0