WebNerd Posted October 22, 2009 Report Share Posted October 22, 2009 (edited) This relates directly to my previous topic here. I couldn't find another topic to answer this question.I'm resorting a list of checkboxes. I've done everything I need to do except change the text displayed with the checkbox. I thought it would be more straight forward. I think I know how to get it to work using some examples I found, but I'd like to know the proper way to do it.To start, I don't think I'm defining the checkbox and label properly. I'm using the common shortcut of just putting the text after the <INPUT> tag. I think I should use the <LABEL> tag. My checkboxes are all named the same thing. Does this mean that I can't use the "FOR" attribute on the <LABEL> tag? How do I find which label goes with the checkbox that I'm changing? Do I just assume that the label is the next element on the form? Or is there a better way to do this?Thank you in advance! Edited October 22, 2009 by WebNerd Link to comment Share on other sites More sharing options...
justsomeguy Posted October 22, 2009 Report Share Posted October 22, 2009 The for attribute should point to an ID, not a name. Element IDs need to be unique. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now