cancel
Showing results for 
Search instead for 
Did you mean: 

checkbox value

orha
Champ in-the-making
Champ in-the-making
Hi,
I'm building a categorizing script. I want to add checkboxes by which the user will be able to choose the relevant category for the file. I fetch the categories with javascript, and in the html template I try to render them to be checkboxes. My problem is how to set the checkbox value to be the category name.
The code I use:

  …
   <#list resultset as node>
   <tr> <td> <td> <input type="checkbox" name = "cat" value = $(node.name)> ${node.name} </option>
   </#list>
The problem is all the vaules are "$(node.name)", and not the specific category names. The categories themselves are shown correctly (so the page looks the way it's supposed to, with actual categories and not "$(node.name)"s).

How can I get the correct values?

Thank you!

Or
2 REPLIES 2

schambon
Champ in-the-making
Champ in-the-making
Hi,

Have you tried using ${node.name} (curly braces) rather than $(node.name) (parentheses)?

orha
Champ in-the-making
Champ in-the-making
How stupid of me…. Sorry and thank you!!