Forums

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

Dropdown menu in a table

Anders Nilsen
Contributor
June 23, 2013

Hi.

We are currently trying to create a wiki space where users are supposed to create documentation of the systems used in the company. We have a few tables and in some of the cells i want there to be a dropdown menu where there are predefined values for the users to choose from, for instance "Criticality" --> dropdown menu with High, Medium, Low etc.. So far i've been out of luck in my search to fix this, so any help would be greatly appriciated ;)

14 answers

2 accepted

8 votes
Answer accepted
Mick Davidson
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.
June 23, 2013

You can add my suggestion to a template, but I'm not sure it's what you want. I can't find a drop down list macro, but there may be a 3rd party in the Marketpalce who make one.

Slightly ugly I know, but you could have a column heading for each level and put the tick box in the heading. All a user has to do then is tick the appropriate column.

Cheers.

Stiltsoft Support
Atlassian Partner
March 16, 2022

Hi Mick, 

As you've put it, dropdown fields can be created with the apps available on the Atlassian Marketplace. 

Our Handy Macros for Confluence is one of the possible solutions for this use case. You can create custom sets with multiple options and switch between them later on.

Stiltsoft Support
Atlassian Partner
March 16, 2022

See the screenshot attached

Status.PNG

1 vote
Answer accepted
Sharon Tan
Community Manager
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
April 22, 2021

Hi there, adding another option that people might find helpful for what they need.

Some users take advantage of the Status macro OOTB in Confluence to list different values as options, each represented by a lozenge that users can choose from when populating a page or table.

Just create a lozenge for all the values you'd like your users to use/choose from, and direct them to populate or copy and paste the right value appropriately.

It wouldn't guarantee that users can't create their own values, but it could help you direct how you'd like people to use the page. 

Also seeing Marketplace apps like Scaffolding Forms & Templates or Easy Dropdown Menu (Drop down selection). You could browse dropdown apps for Cloud or self-hosted and see if anything is of interest.

10 votes
Kevin Jewett
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 30, 2018

Would love this functionality for the cloud version

Stiltsoft Support
Atlassian Partner
March 16, 2022

Hello Kevin,

Handy Macros for Confluence brings this functionality to Cloud with its Handy Status.

7 votes
Siddhartha Mann
Contributor
February 1, 2018

I am so struggling right now for this drop down feature.

 

But yes, this kinda works but not to the desired effect.

 

Is someone in Atlassian listening?

Siddhartha Mann
Contributor
February 3, 2018

:(

Sarah Dosanjh November 13, 2019

You asked what I was looking for?  It would be great to have drop down menu and scroll bar menu as well.  

Like Miriam Cohen likes this
4 votes
Andrey Khaneev _StiltSoft_
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.
November 3, 2017

You can use Handy status macro (Handy Macros add-on) as a dropdown menu.

Paul Craven January 28, 2018

Hi Andrey, would you be able to supply a handy status macro for the cloud version?

Roman Kirilenko
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.
January 29, 2018

Hi Paul,

Unfortunately, we have no plans for Handy Macros for Cloud at the moment. But you can vote for this here.

Just to clarify the reason: Cloud and Server add-ons require totally different approaches due to technical limitations on Cloud. There are not many requests to support Cloud right now (that's why we haven't planned this activity yet). But this is possible in the future.

Like # people like this
Bryan Wilcutt
Contributor
July 29, 2019

You can really nickel and dime yourself to death on Confluence.  I'm working on a dropdown menu macro that'll do everything that Handy does… and will be free.  Coming in the next few weeks.

Like # people like this
Casey Maynard
Contributor
July 29, 2019

Will this be available for Free in the Marketplace though?  Our team would welcome a simple and affordable (free) Add-On, but we'd require it to be available via the Marketplace so that it could can track it via licenses for updates, etc.

But either way Thank You for putting in the effort to find solutions for our Atlassian community.

Like # people like this
Bryan Wilcutt
Contributor
July 30, 2019

Yes.

I've worked at too many places, running projects, that can't have something stupidly simple as a damn calendar without shelling out $10/mo for it... on top of all the other nickels you have to shell out for Confluence.  In the end, you end up paying 2x or 3x more for Confluence just to make it worth using.  There's a good reason why Microsoft SharePoint still exists-- as expensive as it is, it is still cheaper than confluence.

And the source code will be posted too.

Like # people like this
Ann-Marie Batten
Contributor
March 9, 2020

Is this available? 

Like # people like this
James M March 20, 2020

Let us know Bryan if/when this does become available. We appreciate your efforts.

Like # people like this
Danae Vara
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2021

@Bryan Wilcutt  any updates on your development of a dropdown menu macro you were working on?

Like C S likes this
3 votes
Mick Davidson
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.
June 23, 2013

Anders,

I've just done this, but I'm not sure it's exactly what you're looking for. This is what I made it work:

  1. Add the table.
  2. Insert the Expand macro.
  3. On the page in Edit mode, click on the Task List icon in the Toolbar (the one with the ticks).
  4. Add three of those and label them High, Medium, Low.
  5. Save the page.
  6. Now Click on 'Click here to expand'.
  7. Select whichever tick box is appropriate.
  8. Job done. :)

I tested it by navigating away from the page and back again via several others, and when I clicking on 'Click here to expand' the tick was still there, and where I wanted it to be.

Does that do the job?

Cheers.

Mick Davidson
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.
June 23, 2013

PS, don't forget you can change the name from 'Click here to expand' to something more appropriate. :)

Ammar Yasir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 26, 2016

But it only works in the edit mode where you can edit the options on the check boxes and not when you publish the page.

Negi Joon
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2017

Hi,

I can only do it for each cell. What I want though is to expand a whole row in a table.

How can I do that?

2 votes
EPS Software Engineering AG
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 5, 2018

Maybe our App Easy Dropdown Menu could be a solution. It can be found on the Atlassian Marketplace.

Regards,
Stephan (CEO of EPS Software Engineering AG, the vendor of the Easy Dropdown Menu)

Casey Maynard
Contributor
April 5, 2018

Easy Dropdown menu is easy enough to use.  We have in-use on our downs.  It make confluence more like forms, instead of a wiki.

Note: The multi-select option for this is does not look like a traditional 'drop-down' menu, but at least there is a multi-select option.

Like # people like this
1 vote
ITProcurement
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 7, 2019

Got a good solution from https://community.atlassian.com/t5/Answers-Developer-Questions/Creating-a-dropdown-user-macro/qaq-p/494678.

Need to create a new user macro like below. You can update $body.split("\n") ) to $body.split("</p>") ) if html content is used.

## @param DropdownId:title=Unique dropdown ID|type=string|required=true|default=1|desc=If more than one dropdown in page, change this to a unique name.
## @param Label:title=Label|type=string|desc=Enter dropdown label, if desired
#set ( $dropdownId = "" )
#set ( $dropdownId = "dropdown-" + $paramDropdownId )
#set ( $label = "" )
#set ( $label = $paramLabel )
#set ( $toplabel = "" )
#if ( $label == "" )
  #set ( $toplabel = "top-label" )
#end
#set ( $pageId = $content.id )
#set ( $options = $body.split("\n") )
<form class="aui $toplabel">
  <div class="field-group">
    #if ( $label != "" )
      <label for="$dropdownId">$label</label>
    #end
    <select class="select" id="$dropdownId" name="$dropdownId">
    #foreach ( $option in $options )
      #set ( $option = $option.trim().replaceAll('"', '' ) )  
      <option value="$option">$option</option>
    #end
    </select>
  </div>
</form>
<script>
AJS.toInit(function() {
  var canEdit = true;
  
  #if ( $permissionHelper.canEdit($userAccessor.getUserByName($req.remoteUser), $content) )
  jQuery("#$dropdownId").change(function() {
    var dropdownObject = this;
    jQuery.ajax({
      url: contextPath + "/rest/api/content/${pageId}/property/${dropdownId}",
      success: function(dropdownData) {
        dropdownData.value = jQuery(dropdownObject).val();
        dropdownData.version.number += 1;
        jQuery.ajax({
          contentType: 'application/json',
          type: 'PUT',
          url: contextPath + "/rest/api/content/${pageId}/property/${dropdownId}",
          data: JSON.stringify(dropdownData)
        });
      },
      error: function(response) {
        var dropdownData = {};
        dropdownData.key = "$dropdownId";
        dropdownData.value = jQuery(dropdownObject).val();
        jQuery.ajax({
          contentType: 'application/json',
          type: 'POST',
          url: contextPath + "/rest/api/content/${pageId}/property",
          data: JSON.stringify(dropdownData)
        });
      }
    });
  });
  #else
    canEdit = false;
  #end
  
  jQuery.ajax({
    url: contextPath + "/rest/api/content/${pageId}/property/${dropdownId}",
    success: function(dropdownData) {
      jQuery("#$dropdownId").val(dropdownData.value);
      if (!canEdit) {
        jQuery("#$dropdownId").prop( "disabled", true );
      }
    }
  });
});
</script>
1 vote
Zohair Reborn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 5, 2018

Maybe you can use the simple HTML Drop Down list within HTML Macro:

<div>
<select name="Criticality">
<option value="high">High</option>
<option value="medium">Medium</option>
<option value="low">Low</option>

</select>
</div>
Casey Maynard
Contributor
April 5, 2018

How and where do you implement this within Confluence?

Zohair Reborn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 5, 2018

EDIT the confluence page

there is a + sign for the Macros OR start typing {html so that the HTML Macro box is placed.

And paste the above code in that box

Like # people like this
csjasnoch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2018

This solution is nice because it is simple, but I am failing to see how the value is saved from one session to the next.

Won't each session just repopulate the drop down with the top value (i.e. "high")?

Like # people like this
rohit patel April 1, 2019

Hi Zohair, 

I am trying to implement the drop down to filter a confluence table. This table contains of two columns 1. Page title and 2. Category. 

What i want to achieve is to apply the drop down filter to the category and be able to filter based on that. 

When i add the code to the confluence html macro, i get the drop down, which is great but how do i link the drop down menu options with the table?

P.S i am very new to the world of coding so please bare with me :)

Regards,

Rohit

Andrey Khaneev _StiltSoft_
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 1, 2019

Hi Rohit,

You can use Table Filter macro with dropdown filter for this purpose.  See how it works on the demo site.

Like rohit patel likes this
rohit patel April 9, 2019

Thanks for your suggestion Andrey. But i do not have the budget to purchase a plug in. I am looking for a work around maybe using a code?

Regards,

Rohit

1 vote
William G
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2015

High, I'm having the same challenge 2 years after this thread, has anyone got any luck so far ?

0 votes
Casey Maynard
Contributor
November 3, 2017

Just another example of Atlassian community not providing the simplest of feature for page creation.  Give the cost of their licenses, you'd think they be able to provide a faster turnaround on some of these simple features like a drop-down menu option

0 votes
Mick Davidson
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.
June 23, 2013

Yes, it's a bit of a workaround isn't it? :)

0 votes
Anders Nilsen
Contributor
June 23, 2013

I'll give it a try ;) Not exactly what i wanted, but it'll have to do for now so i'll give you the answer on this one ;) Thanks for the feedback :)

0 votes
Anders Nilsen
Contributor
June 23, 2013

(haven't tried it yet), but as it looks by your explanation i cannot do this when creating a global template? (Im using Confluence 4.2.11)

Here's an example:

h2.Application(s)

h3.<Application Name>

||#|||Item|||Information|||Comment||
|1|Appliaction Name / Version:| | |
|2|Number of users:| | |
|3|Criticality:| | | <--- Here's where i want a dropdown menu where the users can put in either "High", "medium", or "low"..
|4|Network:| | |
|5|Application type:| | |
|6|Vendor:| | |
|7|File paths:| | |

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events