V4 Create Update ConfluencePages
Contents |
Creating and updating Confluence Pages
Using Live Forms for Confluence, you can create forms/workflows that store the form data in a Confluence page. The Confluence page can also be updated (edited) using the same form/workflow. Consider the page hierarchy in the Figure above. We are creating an internal Client Management application with a Confluence page for each client. In the example, above we have a page for Ford, GM and Toyota. Each page stores information about the client such as Address, Phone Number, Contact Information etc. The goal is to be able to create these pages in a structured manner using a form or workflow and edit these pages using the same form/workflow rather than allow free-form editing of the Confluence page by users.
The steps are as shown in the Figure above.
- Create a Confluence Template with {frevvoresolve} macros. Optionally, you can embed a macro that will generate a link to edit the page.
- [Optional] Create the parent page of the hierarchy. All pages created/updated by the form will be child pages of this parent page. If you skip this step, all pages will be created as children of the Confluence page which embeds the form or workflow.
- [Optional] Create a confirmation page to display after the form/flow has been submitted. If you skip this step, the child page that is created/updated will be displayed.
- Create a frevvo form or workflow, embed it in a Confluence page and run the Form Action > Create/Update Confluence page wizard.
Create a Confluence Template
Create a standard Confluence template and embed {frevvoresolve} macros in it. As an example, here is a complete template for our Client Information example.
h3. This is the client information page for : {frevvoresolve}<ClientName>{frevvoresolve}
h4. [Click here | {frevvoresolve}<form.edit.link>{frevvoresolve}] to edit this information
| First Name | {frevvoresolve}<FirstName>{frevvoresolve} |
| Last Name | {frevvoresolve}<LastName>{frevvoresolve} |
| Email Address | {frevvoresolve}<Email>{frevvoresolve} |
| Telephone | {frevvoresolve}<Phone>{frevvoresolve} |
Create a frevvo form
Create a Confluence page and add a frevvo form or workflow to it. For details on adding a form or workflow to a Confluence page, please see the Creating Forms in Confluence or Creating Flows in Confluence documentation.
Create/Update Confluence Page Wizard
Click on Form Action and select the Create/Update Confluence page form action.
Complete the wizard that pops up as shown below. Make sure that you enter the Template name exactly including spaces. For the Result Page, we are using a template {ClientName}. This is a field in the form. For example, if the field int he form contained Toyota, the generated result page in Confluence will be named Toyota. The Parent and Display pages are optional.
Use the form
Fill out the form and Submit it. The result page is shown below.
Updating the form
Once your form is in use, your users have submitted the form a few times and Confluence pages have been created from those submissions, you must be careful when making edits to the form. If you make incompatible changes to the form - essentially, if you change the structure of the form in such a way that it is incompatible with the original structure - your users may not be able to Edit their existing Confluence pages using the form. That's because the Edit Confluence page functionality relies on initializing the form with the XML document generated by frevvo. Please read the above-mentioned Section on XML documents that frevvo generates carefully before you edit your forms.






