Booking Form – Checkboxes with link

WordPress Event Management, Calendars & Registration Forums General Question Booking Form – Checkboxes with link

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 5 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31094

    Hi there,

    I do not need the ‘Terms and Conditions’ box. I don’t want to copy the whole terms and conditions – site into that box and format the text again.
    So I wanted to use a checkbox like ‘Yes, I accept the terms & conditions’ and the whole text should be a link to the site on my homepage.
    But when i want to use this is shown as normal text and not converted into HTML.
    I want to do the same with the data protection.
    How can I do this?

    Thanks!

    DFH Service GmbH
    #31095

    Hi,

    You could edit the checkbox template (templates/booking-form/eo-booking-form-checkbox.php – copy to your theme folder first) and replace

    <?php echo esc_html( $label ); ?>
    

    with

    <?php echo $label; ?>
    

    You should only really do that if you’re certain that any user who can edit the booking form can be trusted. It would allow them to put any HTML in the field. By default only users who can manage_options (i.e. administrators) can edit booking forms, so it should be ok.

    You could replace esc_html with wp_kses and the appropriate arguments to allow some HTML but not any valid HTML. See the codex for details.

    Stephen Harris
    #31107

    Hello!

    Hmm … yes, the link is now shown as a link and not the as the html code but i can’t use the link. When i click on it, it only activates the checkbox and doesn’t follow the link.

    Thanks!

    DFH Service GmbH
    #31129

    Do you have a link to the page? It works for me, here’s a proof of concept: https://jsfiddle.net/eckvrfp5/

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.