In the Template Tags overview it says:
[key:signed] - Has a value of "yes" or "no". If tag can be used to display a badge.
(I guess this also is the same for key:customCheckbox1 and 2)
How do I write the HTML to do this?
I can only make it to show "Yes" or not show anything if I use the <!--IFsigned [key:signed] ENDsigned--> when the box is checked.
The magic IF tag and checkboxes
- perarneflo
- Bruji Friend
- Posts: 18
- Joined: Mon Aug 29, 2011 12:55 pm
- Location: Oslo, Norway
Re: The magic IF tag and checkboxes
Try using just
instead of
in the html.
If you use the IF-tags it only shows when the box is checked. By skipping that part of the code it shows even if the box is not checked.
Code: Select all
[key:signed]
Code: Select all
<!--IFsigned [key:signed] ENDsigned-->
If you use the IF-tags it only shows when the box is checked. By skipping that part of the code it shows even if the box is not checked.
- perarneflo
- Bruji Friend
- Posts: 18
- Joined: Mon Aug 29, 2011 12:55 pm
- Location: Oslo, Norway
Re: The magic IF tag and checkboxes
I'm afraid this doesn't answer my question.
By using [key:signed] I can display "Yes" or "No" if it is checked or not, but how do I use it to display something else like a picture only when it is checked?
By using [key:signed] I can display "Yes" or "No" if it is checked or not, but how do I use it to display something else like a picture only when it is checked?
Re: The magic IF tag and checkboxes
Use this:
IF statements aren't processed unless the tag appears so putting the [key:signed] tag into the 'name' attribute ensures that the IF statement is taken into account but also doesn't display the key but instead whatever image you choose.
Code: Select all
<!--IFsigned <img src="coolpicture.jpg" name="[key:signed]" /> ENDsigned-->