Forums

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

Create a user macro that adds a label(s) to a page

Thomas Hardin
Contributor
March 19, 2014

I know this has been asked several times before, but I was wondering if anyone has been able to create a user macro that can add a label to a page.

I am working with some work request pages, which are predefined templates. One of those pages is designed to identify product impacts. So, what I want to do is provide users with several checkboxes that represent the product pages, which maintain all documentation for a given product (we have multiple products).

If the user checks the box, the product label is applied to the product impacts page. If I could somehow apply the work request label to the product page also, that would be really cool, but I'm not sure if that's possible.

I'm a new Confluence user, so please be gentle.

Thank you!

2 answers

1 accepted

0 votes
Answer accepted
Jonathan Simonoff
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.
March 19, 2014
Thomas Hardin
Contributor
March 19, 2014

I tried that and while it provides a full list of labels, it doesn't support what I need to do. I may be a ble to take the actual attach label piece from it, but that still leaves the other part of creating the checkbox, where if selected the label is attached and if deselected, the label is removed. I'm a very inexperienced user so, I apologize for my ignorance.

0 votes
Thomas Hardin
Contributor
March 20, 2014

Another issue I'm having is keeping the checkboxes checked. Right now, when I leave the page, everything resets. Any suggestions?

## @noparams

<script>
function check()
{
document.getElementById("check1").checked=true
}
function uncheck()
{
document.getElementById("check1").checked=false
}
</script>
<table>
<tbody>
<tr>
<td colspan="7"><form>
<input type="checkbox" id="check1">HWTX
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">HWMB
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">HCFG
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">IBBA
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">MIDR
</form></td>
</tr>
<tr><td colspan="7"><form>
<input type="checkbox" id="check1">HWPS
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">EWTX
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">EFDE
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">DOCO
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">PREA
</form></td>
</tr>
<tr>
<td colspan="7"><form>
<input type="checkbox" id="check1">FRNT
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">HREP
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">SYSA
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">JAVP
</form></td>
<td colspan="7"><form>
<input type="checkbox" id="check1">T3RT
</form></td>
</tr>
</tbody>
</table>

Suggest an answer

Log in or Sign up to answer