Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Duplicate a submitted form

31 views
Skip to first unread message

Mani

unread,
Jul 31, 2024, 1:00:32 PM7/31/24
to Orbeon Forms
Hi Alex/Eric

We are exposing the form through liferay using the liferay proxy portlet.

Scenario - User wants to do multiple submissions of the same form but with changes to some fields in each submission.

Is it possible for a user to copy the form data from a submitted form to a new version of the same form so they do not have to enter all the data again. 

Erik Bruchez

unread,
Jul 31, 2024, 10:32:17 PM7/31/24
to orb...@googlegroups.com
Mani,

One easy way, which also works through the proxy portlet, is to go to the form's Summary page. From there, you have a "Duplicate" button, which allows you to duplicate form data.


Would this work for you? Or would you like a more automated way to do it?

-Erik

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/39b1fce8-925d-48d2-8f8f-cf830278e2ben%40googlegroups.com.

Mani

unread,
Jul 31, 2024, 10:39:12 PM7/31/24
to Orbeon Forms

currently we do not expose the summary page to the end user

Erik Bruchez

unread,
Aug 1, 2024, 12:38:44 AM8/1/24
to orb...@googlegroups.com
In that case, setting these properties should do the trick. They define a new button called `save-then-new` (but feel free to pick your own button name), set a label for it, and we define a process that runs when this button is activated. It runs the standard `save-final` process, and then issues a new document id. Here I restricted this for a form with app name `my-app` and `my-form`.

<property as="xs:string" name="oxf.fr.resource.*.*.en.buttons.save-then-new">
    Custom Save
</property>

<property as="xs:string"  name="oxf.fr.detail.process.save-then-new.my-app.my-form">
    save-final
    then xf:dispatch(name = "fr-new-document", targetid = "fr-persistence-model")
</property>

<property as="xs:string"  name="oxf.fr.detail.buttons.my-app.my-form">
    save-then-new
</property>

I hope this helps,

-Erik

ebruchez

unread,
Aug 1, 2024, 2:06:14 PM8/1/24
to Orbeon Forms
As an update, we added a built-in process action called `edit-to-new` which will be available starting Orbeon Forms 2023.1.4. This will avoid using a custom and undocumented event dispatch. The new process will then be:

<property as="xs:string"  name="oxf.fr.detail.process.save-then-new.my-app.my-form">
    save-final
    then edit-to-new
</property>

-Erik

Reply all
Reply to author
Forward
0 new messages