Hi please tell me how I can get a checkbox with some text containing a link to my TOS page? This field should be required and should show the red validation message if the user tries to submit without checking the box. I can’t figure out what needs to go into the field options for a checkbox where it will understand the hyperlink html.
In my latest attempt, I am escaping many special characters like the equals sign and the quotes but I can’t get anything to work. I’ve tried several variations but it just doesn’t seem to be liking the hyperlink in the field options for a checkbox.
This topic was modified 12 years, 9 months ago by jared.
You can use HTML field and checkbox field together to create your TOS page link and validation.
In HTML field, you can put your hyperlink and data. In checkbox, write ‘Aggreed TOS.’ or something like this in ‘Field Option’ and also check required from checkbox configuration.
Thanks. What I ended up doing was taking a look at the HTML generated for a normal required checkbox field without the hyperlink. I then used that as a guide to create an HTML field complete with the same div wrapper, css classes, label and an input checkbox field with the same checkbox validator class. Also, it was important that my label and input checkbox had an ID or it would not work correctly.
May I suggest that you document the HTML field in greater detail? For example, I had to fiddle with it a lot before I found out that I should not be using quotes anywhere in my HTML markup as your plugin seems to be inserting the quotes automatically.
With version 1.1.2rc2, Please follow bellowed instructions:
1. Open user-meta/controllers/umFiledsController.php by any ftp client.
2. Replace (line 86)
update_option( $userMeta->options[‘fields’], $data );
with
update_option( $userMeta->options[‘fields’], stripslashes_deep($data) );
3. Save changes.
Hi Khaled,
this was great.
Now i have put the text and the link in the checkbox resp. the Field Description of it. And it works fine 🙂
Many thanks
Best Regards
Andi
Author
Posts
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.