Can you do a checkbox with macros?
Asked by ticoulat:

I want to do a checkbox with macros or someting else.  
[](https://community.atlassian.com/t5/Confluence-questions/Can-you-do-a-checkbox-with-macros/qaq-p/181229?attachment-id=480){#link_118bd9333b110b}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/30335/1/2016-06-03%2008_52_10-If%20One%20-%20demo%20-%20Confluence.png){#display_118bd9333b110b_0}


Answers:
author: Jeremy Largman
body: You don't need something complicated like that - just add a tasklist!

<https://confluence.atlassian.com/display/DOC/Tasklist+Macro>

comments: author: Jeremy Largman
body: Since Confluence 5, this feature is right in the editor. Just find the checkmarks, it's fully integrated with [workbox](https://confluence.atlassian.com/display/DOC/Configuring+Workbox+Notifications).


author: scm di pins
body: this is the most simple solution, thanks!


author: Jeremy Largman
body: ![Tasklist.png](https://community.atlassian.com/t5/image/serverpage/image-id/4651iE8C2256F18D3A47F/image-size/large?v=v2&px=999 "Tasklist.png")

Looks like this -- it's a little confusing since it's called a 'tasklist' in other parts of the documentation.


author: GuilhermeA
body: I think Radu is right, we need a little more guidance on what you need to perform. Anyway, you can do a checkbox with custom macros. However it would be static, and would not allow you to edit anything on the list itself. Unless you want a very specific list that needs to be done. Go to user macros and create a new one.

1. Name
2. Title
3. Rendered
4. And the Code

   ```
   ## @noparams&lt;script&gt;function check()  {  document.getElementById("check1").checked=true  }function uncheck()  {  document.getElementById("check1").checked=false  }&lt;/script&gt;&lt;form&gt;&lt;input type="checkbox" id="check1"&gt;Do you like this checkbox?&lt;/form&gt;&lt;button onclick="check()"&gt;Select All&lt;/button&gt;&lt;button onclick="uncheck()"&gt;Unselect All&lt;/button&gt;
   ```

And it would fill your page with a custom Macro, but without being able to edit any of the things to do of the checklist.

Hope it helps

comments: author: Manali Butey
body: Hi

How can I make the checkboxes remember the ticks?

I am trying to create checkboxes but do not want them to be tasks. I have used your code to do so but when i switch pages, all the checkboxes get unticked. Is there some way in which I can make the checkboxes retain the ticks.

Thanks in advance


author: Jackie Wheeler
body: In a related question, we use numbered lists throughout our documentation for procedures users should follow. I would like to display numbered lists with a checkbox next to each step so that users can check the box as they follow the steps and keep track of what they've done. Something like this, where \[ \] is the checkbox icon:

\[ \] 1. Download the software at foo.com.

\[ \] 2. In the directory where you downloaded it, launch the RUNME program file and follow the steps on the screen.

And as users follow these steps, they would ideally be able to click those check boxes and a check mark would appear so that they know they completed it.

Ideally, it would be great to add this checkbox to the stylesheet so that it would appear automatically in numbered lists.

Any ideas?

comments: author: James
body: Hi Jackie,

You can use the Checkbox macro to get most of what you want. The screenshot below shows your example, with a checkbox for each point and the first one checked. You might need to play with the formatting to get it to align more closely to what you have it mind.

2016-06-03 08_52_10-If One - demo - Confluence.png

You get get it from the Atlassian Marketplace here: [https://marketplace.atlassian.com/plugins/com.gumvillage.confluence.checkbox.checkbox.](https://marketplace.atlassian.com/plugins/com.gumvillage.confluence.checkbox.checkbox)


author: Jackie Wheeler
body: Thanks, I'll check it out (no pun intended) and see if we can make it work the way we want it.


author: David Skreiner
body: Please stop suggesting expensive plugins as "workarounds".


author: Greg Carpenter
body: We have a somewhat different use case.

We want to provide a Confluence page that can be collaboratively edited. When a section should contain one of several well-known fixed options, we'd like to provide a selection list inline on the page. When a selection is made, just the text associated with the selection should appear on the page, with a little dropdown icon so it can be changed.

Basically we want a Confluence page to act like a mini-form. We don't need traditional web form text fields; the text is just edited inline as for any page.


author: Casey Maynard
body: Gumville version is not supported for 6.5.0

Are there any other workarounds?

Thanks


author: James
body: The Checkbox plugin for Confluence can do what you ask. You get get it from the Atlassian Marketplace at <https://marketplace.atlassian.com/plugins/com.gumvillage.confluence.checkbox.checkbox>


author: Radu Dumitriu
body: I think your question should be more specific: try to reformulate it, like "Can you do a checkbox with macros or something else?". Leaving the joke aside, I really think you should explain to the confluence experts on this forum what you want to achieve ...


Tags: checkbox