...
Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
On this page
|
Overview
...
The Run macro allows you to easily enter data on a page by automating the input process. Configure the user from using the macro to enable the user to enter values on a confluence page. The Run macro will render the newly entered values and replace the old values with the new.
Description
Provides a user form with input fields before rendering the body of the macro. Form fields will be used to replace variables in the body prior to rendering. Field values can be provided by user interaction, pre-defined variables, or request parameters. Any text in the macro body that begins with $ immediately followed by a key found in the replace parameter list (see Field types for details) will be replaced by the value. Usually, values will be provided by a user submitting a form from the page based on the replace parameter. Default values can be specified.
...
- User interaction - a user inputs data into the fields you've defined.
- By using Pre-defined variables.
- By including request parameters (from the URL).
...
- the value when the text begins with '$' immediately followed by a key found in the replace parameter list (see Field types for details). Typically, values will be provided by a user submitting a form from the page based on the replace parameter. When defining field types, default values may be specified.
- dynamic text using any Field key parameters that begin with '$' followed by a Field key.
...
Info |
---|
Encode variablesYou might want to encode Run macro variables before rendering the output. Use urlencode or base64 encoding options with a prefix '$variable_' in the macro body to encode the intended variable. For example, use $alist_base64 to endcode the alist variable. |
Work with field settings
With the Run macro on our Confluence page, it's time to explore adding fields to a form.
Examples
- Horizontal radio button -
gender:M:Gender:radio::M:Male:F:Female
- Single select with 12 lines -
month:12:Month:select:12:1:Jan:2:Feb:3:Mar:4:Apr:5:May:6:Jun:7:July:8:Aug:9:Sept:10:Oct:11:Nov:12:Dec
- Checkbox (value same as text) -
day::Day of$nbsp;week:checkbox-required:7:Sunday::Monday::Tuesday::Wednesday::Thursday::Friday::Saturday
...
- Any valid i18n key defined in Confluence can be used (example: @dashboard.name)
- Custom keys (beta - subject to change based on user feedback)
- Can be defined and accessed via @custom.example.key.
- This requires customization that requires your system administrator. Custom keys must be added to a property file named org.swift.confluence.run.custom.properties. Appropriate language translations property files named after the language abbreviation (example: org.swift.confluence.run.custom_fr.properties) and inserted into the add-on jar under i18n directory.
Usage
The following examples are given in wiki markup format so it is easy to copy and paste. Use Insert > Markup in your Confluence editor to paste in the examples.
...