code_junkie

How to have a link in label of a form field

Nov 13th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. BooleanField(label="I agree to <a href='terms-conditions.html'>terms&conditions</a>")
  2.  
  3. <label>I agree to terms&conditions</label>
  4.  
  5. <label>I agree to terms&conditions</label> (<a href="terms-conditions.html">terms&conditions</a>)
  6.  
  7. {% for field in form %}
  8. {{ field.label_tag }}
  9. {% ifequal field.name 'tos' %}
  10. <a href="/terms/">I have read and agreed to the Terms of Service</a>
  11. {% endif %}
  12. {% endif %}
Add Comment
Please, Sign In to add comment