Due to the code you pasted in a post (I think), I can't reply there..
Try the following:
I added some color to show what refers to where, in case you want to use multiple of these things on a page. In that case make sure all names are unique on that page.
The result should look like: