In this quick demo we show how to access other fields your database query returns together with the data for your dropdown field

Which uses a SQL like this to get the values:

select id, name, link from CD_DEMO

In a table we have just 3 rows and we return 3 columns:


idnamelink

1

ConfiForms add-on for Confluencehttps://marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.confiform/server/overview
2ConfiDoc add-on for Confluencehttps://marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.confirest/server/overview
3Smart Templates & Pages nice apphttps://marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.smart-templates/cloud/overview



values in a form so far (we show "choice" field and we show the "link" property of the "choice" field with "choice.link"). See the SQL we have to get the values for "choice" field


Storage format

<ac:structured-macro ac:macro-id="0ce974b8-3d3e-4a91-9b95-4b93c50f67d8" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">cddemo1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="c3d7a641-7ff5-4ae2-8a3b-770ea93acad1" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">choice</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Make a choice</ac:parameter>
        <ac:parameter ac:name="values">select id, name, link from CD_DEMO</ac:parameter>
        <ac:parameter ac:name="extras">7422036e-9a6f-4455-92d9-7140131fb9da</ac:parameter>
        <ac:parameter ac:name="fieldDescription">Select the plugin</ac:parameter>
        <ac:parameter ac:name="type">dbselect2</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>


<p>values in a form so far</p>
<ac:structured-macro ac:macro-id="d8cf6cfa-59da-467c-8540-cb103e04895b" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">cddemo1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="c9b1c589-4659-4da4-824b-269f8e237caa" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">choice</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="64ec846a-4321-4d92-8ffe-74e2d5af7e6c" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="overrideLabel">Show the link</ac:parameter>
        <ac:parameter ac:name="fieldName">choice.link.asLink</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>