Support » Plugin: WP-Members Membership Plugin » TOS Checkbox and text issue (recurring)

  • Resolved palatin8


    I’d like to re-open this closed thread and support user @islp.

    The current behaviour of TOS checkbox isn’t suitable. We need approval to terms of service as text right beside the checkbox, not as a link to a new page. Given that wp-members-tos.php is absolutely unstyled, you don’t seem to care much about GDPR.

    I have tried Chad’s suggestion to create a new checkbox field for my own TOS, but I need to place all of my text of agreement to the field title, do styling to arrange the checkbox left to the label, but still cannot set a link to my privacy policy page in the field title eq. label because html tags are not allowed there.

    • This topic was modified 11 months, 1 week ago by palatin8. Reason: typo
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chad Butler


    There are potentially several approaches.

    The first is of course use the default field. Keep in mind that’s a starting point. The default link allows general text for a popup. This can include HTML markup as desired.

    A step beyond that can be to create a Terms page within your site structure and indicate that the TOS field link should open that instead of the default. You can indicate the location of that page using the tos shortcode (see:

    You can alter the link entirely to open whatever is desired. There are a number of places in the form building process to filter that to be what you want.

    * wpmem_tos_link_txt – changes the text. This can include changing where the link tags go (as described in the documentation).
    * wpmem_register_form_rows – this allows you to change a number of aspects related to this (or any) field in the array of form fields (as outlined in the documentation). Most specifically in your case, you can use this to alter the input tag contained in the ‘field’ key of the array.

    I thought there was a filter to change just the link itself directly, but in looking through the form builder, that doesn’t seem to be the case, so I’ll add one in the next release.

    Those all describe working with the default field. You aren’t limited to using that – you can certainly implement your own custom field of whatever type necessary. You are correct that HTML is not (currently) allowed in the creation of a field (so the label cannot contain HTML, nor can a default value). Presently, that’s a security issue to prevent cross site scripting exploits (XSS) and such. It is planned to update this in the near future to allow specific HTML in the creation of form fields. I know that doesn’t address your current question/situation, but I mention it for future reference.

    In the meantime, if customization of any sort is needed in a form field, whether that’s additional HTML or anything else, the best way to achieve that is using the wpmem_register_form_rows filter I mentioned above (documentation linked above). That allows you full control over what ultimately gets displayed. You can use that filter to apply a custom label and/or input tag as necessary.

    • This reply was modified 11 months, 1 week ago by Chad Butler. Reason: fixed links/code formatting

    Hi Chad,

    thanks a lot for the detailed answer. Now, that was easy: wpmem_tos_link_txt is all I need! With this filter I can have all of my TOS text and checkbox right before the register button. I use the built-in link for further reading, and redirect wp-members-tos.php to my privacy-policy page. All is fine.

    Excuse my ignorance. I am new to WP-Members. It works out-of-the-box, but there is so much more to explore. Thank you, once again!

    Plugin Author Chad Butler


    No problem – this kind of forced me to look at an area of the form building function that generally gets overlooked because it doesn’t change all that much over time. But in looking at it, I think it makes sense to add a filter in there for the actual TOS link HTML as well so that can be filtered directly as well.

    So version 3.2.6 will include a new filter – wpmem_tos_link_tag – it will filter the HTML tag for the tos link. That will add an additional element of flexibility if someone wants to change what is contained in the tag (classes, id, target attribute, etc).

    No sense of urgency for me anymore, but increasing flexibility is always welcome. +1 support

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘TOS Checkbox and text issue (recurring)’ is closed to new replies.