heldercervantes Posted August 13, 2015 Share Posted August 13, 2015 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 More sharing options...
LostKobrakai Posted August 13, 2015 Share Posted August 13, 2015 The value is meant to be use for the html value attribute, therefore markup has to be striped. Use $field->label and $field->label2 to change the texts around the checkbox. 2 Link to comment Share on other sites More sharing options...
heldercervantes Posted August 13, 2015 Author Share Posted August 13, 2015 Doesn't work. label, label2 or description, they're all converting tags to plain text. Maybe I can handle this with InputfieldMarkup. I'll give it a try. Link to comment Share on other sites More sharing options...
LostKobrakai Posted August 13, 2015 Share Posted August 13, 2015 Maybe try markdown syntax [Title](http//:…/). This at least works for the description/notes. 4 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