Playground and DEMO space
This is a playground and demo space for ConfiForms and ConfiDoc addons developed and supported by Vertuna LLC
Most pages provide a storage format for the demo, so you can use the free add-on from Atlassian Confluence Source Editor (or through the bundled in ConfiForms storage editor) to import this configuration into your Confluence and see it in action
To import examples from the storage format on Confluence Cloud please see this page
Please note, all the examples here are provided without any obligation and may or may not be incomplete or may have bugs, and we provide NO SUPPORT for these examples and demos.
We use a so called "virtual field" - just an arbitrary field we set up with Registration Control. Why "virtual"? Because the field is not defined on the form via field definition, but is used in rules to "initiate" some action(s) and/or behavior
In this case we call it virtualField (could have any name) and our form has afield definition rule to lookup the value for the smart field in another form based on the value (preset) given to this virtual field
Choices
Choice |
---|
new option |
another |
choice 1 |
another choice |
Registrations Controls with preselects
preselecting via virtual field for choice 1
Source code for the demo
(formnames have a postfix 1 in their names)
<ac:structured-macro ac:macro-id="0641f421-d4d4-4d26-aeb8-52f9dea39393" ac:name="confiform" ac:schema-version="1"> <ac:parameter ac:name="formName">formWithSmartField1</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="5dc30adb-32e5-44cd-9bf7-c6216a52cc39" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mychoice</ac:parameter> <ac:parameter ac:name="fieldLabel">My choice</ac:parameter> <ac:parameter ac:name="values">[29393329|formWithChoices1|choice|true||]</ac:parameter> <ac:parameter ac:name="type">smartselect2</ac:parameter> </ac:structured-macro> </p> <p> <ac:structured-macro ac:macro-id="23712e1c-8018-4a0c-95b4-84d129caf112" ac:name="confiform-field-definition-rules" ac:schema-version="1"> <ac:parameter ac:name="condition">id:[empty]</ac:parameter> <ac:parameter ac:name="fieldName">mychoice=[entry.id]</ac:parameter> <ac:parameter ac:name="values">choice:[entry.virtualField]</ac:parameter> <ac:parameter ac:name="action">Lookup and set value</ac:parameter> <ac:parameter ac:name="actionFieldName"></ac:parameter> <ac:parameter ac:name="values2">formWithChoices1:@self</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="26e10a88-18a8-4b7a-ac1c-cd5d2b156238" ac:name="confiform" ac:schema-version="1"> <ac:parameter ac:name="formName">formWithChoices1</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="f0555f32-c7c4-4e25-9771-ee612a5b6b92" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">choice</ac:parameter> <ac:parameter ac:name="fieldLabel">Choice</ac:parameter> <ac:parameter ac:name="type">text</ac:parameter> </ac:structured-macro> </p> <ac:structured-macro ac:macro-id="5a34863e-b388-402b-8045-6c9cc844a520" ac:name="confiform-entry-register" ac:schema-version="1"> <ac:parameter ac:name="registrationButtonLabel">Register choice</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <p> <br/> </p> <p>Choices</p> <ac:structured-macro ac:macro-id="3006fb70-1d79-44ae-9663-e80a64c73a62" ac:name="confiform-table" ac:schema-version="1"> <ac:parameter ac:name="formName">formWithChoices1</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p> <br/> </p> <p> <br/> </p> <p> <br/> </p> <p>Registrations Controls with preselects</p> <p>preselecting via virtual field for <strong>choice 1</strong> </p> <ac:structured-macro ac:macro-id="66951458-49fb-42ae-b7ba-21c9c8998140" ac:name="confiform-entry-register" ac:schema-version="1"> <ac:parameter ac:name="formName">formWithSmartField1</ac:parameter> <ac:parameter ac:name="presetValues">virtualField=choice 1</ac:parameter> <ac:parameter ac:name="embedded">true</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p>preselecting via virtual field for <strong>another choice</strong> </p> <ac:structured-macro ac:macro-id="d798e26e-24ea-445e-91d2-49df9a097089" ac:name="confiform-entry-register" ac:schema-version="1"> <ac:parameter ac:name="formName">formWithSmartField1</ac:parameter> <ac:parameter ac:name="presetValues">virtualField=another choice</ac:parameter> <ac:parameter ac:name="embedded">true</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro>