Additional Fields Coding

I need to be able to add a line of text with a link to the right of the checkbox (see attached pic). I like the way the Google calendar button and checkbox line looks. The circled red part is what I'm wanting to add but have the underlined area link to a specific page or pop up (where the link goes isn't super important at this point). This site is my test environment. Our live site is not updated yet.

Thank you!
~Suzy B

  • Adam Czajczyk

    Hello Suzy,

    I hope you're well today and thank you for your question!

    Currently this is not doable using Appointments+ settings but I think this additional snipped of code will help you here:

    <?php
    function app_add_field_link_text() {
        ?>
        <script type="text/javascript">
        jQuery(function($) {
            $('div.appointments-field.appointments-termsofagreement-field').append('Click <a href="https://google.com" class="my_app_terms_link">here</a> to read our ToA!');
        });
        </script>
        <?php
    }
    add_action('wp_footer', 'app_add_field_link_text');

    To apply it to your site please create an empty file with a ".php" extensions, put the code inside it and then upload the file to the "/wp-content/mu-plugins" folder of your site's WordPress installation. If there's no "mu-plugins" folder inside "wp-content" please create it.

    Don't forget to adjust the text inside the "append() function" - this is what will be shown on page (it can include HTML tags).

    I hope that helps!
    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.