Question about FormsQuestion about Formshttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1213231212024-03-19T12:55:36Z2024-03-19T12:55:36ZRE: RE: Question about FormsShin Chanhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213286142022-01-12T16:04:59Z2022-01-12T02:07:19Z<p>Thank you Russell. I will try your solution.</p>Shin Chan2022-01-12T02:07:19ZRE: Question about FormsRussell Bohlhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213262862022-01-10T15:08:17Z2022-01-10T15:08:17Z<p>It sounds like you could use a <a
href="https://learn.liferay.com/dxp/latest/en/liferay-internals/extending-liferay/creating-a-model-listener.html">Model
Listener</a> for this, on the <code>DDMFormInstanceRecordVersion</code>.</p>
<p>You'd want to override the <code>onAfterCreate</code> method. In it
you'll need to check if the newly created form record was submitted
for the form you want to inject logic on. Then, check if the status of
the record is approved. Then, inject your business logic for creating
the PDF and sending the email.</p>
<p>If <code>onAfterCreate</code> doesn't seem to be working all the
time, you might also need to put the same logic into
<code>onAfterUpdate</code>. This is because the forms system has an
autosave feature, so when the user clicks submit it might either be a
create or and update in the backend.</p>
<p>There's a very similar discussion going on in <a
href="https://liferay-community.slack.com/archives/C5GE6CH8R/p1640670328111600">Liferay's
community slack</a>, by the way. Go <a
href="https://liferay.dev/chat">here to join the slack worskpace</a>
if you aren't already in there.<br /> </p>Russell Bohl2022-01-10T15:08:17ZQuestion about FormsShin Chanhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213231202022-01-08T04:27:32Z2022-01-08T04:27:32Z<p>We have a custom portlet which is a simple 10 field FORM, information
submitted is captured and saved into a PDF document and emailed to
predefined recipient using custom code.</p>
<p>When migrating to latest version (7.2+), we are thinking of using
Liferay Forms (
https://help.liferay.com/hc/en-us/articles/360017894612-Introduction-to-Forms
) as much as possible. Creating the form is simple, but no idea