Jump to content

InputfieldCheckbox with link in label


heldercervantes
 Share

Recommended Posts

I'm surprised I can't find anyone asking this before. Maybe I'm missing something obvious.

All I'm trying to do is add a terms of use checkbox at the end of a registration form, like so:

$field = $modules->get("InputfieldCheckbox");
$field->label = "Terms of use";
$field->attr('id+name','terms');
$field->checkedValue = "I accept this site's <a href='/terms/'>terms of use</a>.";
$field->required = 1;
$form->append($field);

Simple enough, and it works, but the link gets converted to plain text when the page is rendered.

Is there a clean way to get around this? Or do I need to use something other than InputfieldCheckbox?

Thanks

HC

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...