Creating a Page When a Form is Submitted
Creating a new page from a form submission is useful if form responses require a follow-up or collaborative action, for example, if a user submits an internal feature request or events proposal. If you have Script Runner for Confluence installed, you can run a script on the “FormSubmitEvent” that creates a new Confluence page when a form is submitted.
Instructions
Create a new Form that includes input fields to collect a specified Space Key, Page Title and Page Content.
You can include additional fields such as a parent page or Forms Attachment macro if needed.- Configure the Event Listener for
FormsSubmitEvent
, where thespaceKey
,pageTitle
, andpageContent
correspond to the name parameter defined for the macros in your form. When the form is submitted, a new page is created with the values entered by the user.
|
FormsSubmitEvent
in Action
Using our example script and form, when the form is submitted, a new page is created in the DW (Documentation) space in Confluence titled Who is in/out, with the Request details displayed in the page body. Users can then comment on, share, update, or action this page as needed.