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.
When you change the selection in "My dropdown field" you will see a custom JavaScript function gets executed, that's shows the alert message with values for both fields
Storage format
<ac:structured-macro ac:macro-id="4f089566-1bc1-4cd0-b0f0-7293bec8b5bd" ac:name="confiform" ac:schema-version="1"> <ac:parameter ac:name="formName">myform1</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="8d4fe691-7455-4bc3-a937-5a94eaf9b08d" ac:name="confiform-entry-register" ac:schema-version="1"> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p> <ac:structured-macro ac:macro-id="ea69e0c8-e702-4152-87a2-c90b79d5239e" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mytextfield</ac:parameter> <ac:parameter ac:name="fieldLabel">My text field</ac:parameter> <ac:parameter ac:name="type">text</ac:parameter> </ac:structured-macro> </p> <ac:structured-macro ac:macro-id="6c80ef56-4120-4cdf-9a16-79f1581eff83" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mydropdown</ac:parameter> <ac:parameter ac:name="fieldLabel">My dropdown</ac:parameter> <ac:parameter ac:name="values">false[1=one|2=two|]</ac:parameter> <ac:parameter ac:name="type">select</ac:parameter> </ac:structured-macro> <p> <ac:structured-macro ac:macro-id="6678b496-d4b3-494b-96f2-a3f7f8379d74" ac:name="confiform-field-definition-rules" ac:schema-version="1"> <ac:parameter ac:name="condition">!mydropdown:[empty]</ac:parameter> <ac:parameter ac:name="values">showMessage(AJS.$(formName));</ac:parameter> <ac:parameter ac:name="action">Run custom JavaScript</ac:parameter> </ac:structured-macro> </p> <p> <ac:structured-macro ac:macro-id="3ccfa079-e1cf-4822-88b1-6d0efca88bc0" ac:name="confiform-field-definition-rules" ac:schema-version="1"> <ac:parameter ac:name="condition">!mydropdown:[empty]</ac:parameter> <ac:parameter ac:name="values">showMessage(AJS.$(formName));</ac:parameter> <ac:parameter ac:name="action">Run custom JavaScript</ac:parameter> <ac:parameter ac:name="actionFieldName">mydropdown</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="ee8e0309-35b6-438b-94c4-37045b567a63" ac:name="html" ac:schema-version="1"> <ac:plain-text-body><![CDATA[<script> function showMessage(myform){ alert(AJS.$(myform).find('#i_mydropdown').val() + ' ' + AJS.$(myform).find('#i_mytextfield').val()); } </script>]]></ac:plain-text-body> </ac:structured-macro>