Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using AUI - Forms in a confluence page

Ruben Zimmermann April 7, 2018

Hi,

 

I have added a few radio buttons via the HTML macro into a confluence page.

https://docs.atlassian.com/aui/7.8.0/docs/forms.html

 

The form itself works, but the state is not stored.

 

What have I missed?

 

Thanks in advance

 

Ruben

1 answer

1 accepted

0 votes
Answer accepted
Thor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2018

To save values stored in form elements on your page you need to persist them somehow.

A common approach would be some javascript to collect the inputs values and send them to a REST endpoint (java) where they can be stored in the database or in a file for example.

Ruben Zimmermann April 8, 2018

 

Thanks for feedback. Do you have another idea how I could accomplish my idea (without purchasing additional plugins)?


For the common approach, could you point me to a sample app to study a bit how this works?


Ruben

Thor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 9, 2018

You're welcome. Unfortunately there is no easy or free way to create forms in Confluence.

If you want to do this without using any plugin you'll need someone who understands at least the HTML and JavaScript basics.

I currently don't have an example but the steps you'd have to follow are straight forward:

  1. Create a confluence plugin with the Atlassian SDK
  2. Build a REST endpoint with the REST Plugin Module
  3. Persist and retrieve data at the endpoint with
    1. Active Objects OR
    2. via Plugin Settings (SAL)
  4. Control form submission / handling with some javascript that you either
    1. inject via HTML macro (very dirty approach, not recommended)
    2. include in your plugins web resources and load into the according context

This is basically all you need to persist form data in confluence. To make it user-friendly you can either build your own plugin or you'd have to use one of the existing plugins from the marketplace or contact a company to build something that follows your exact specifications.

Ruben Zimmermann April 9, 2018

Thank you very much for the detailed explanation. :-)

Very appreciated.

 

I guess I will go for the marketplace approach if I am asked to add a full featured form ;-)

Thor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 10, 2018

You're welcome :-)

I wish you good luck finding the right solution for your goals!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events