• Resolved EB

    (@eiabergm)


    Hi.

    Thank you for a nice plugin. I have one problem with it. When customers log in, and book a meeting, the system automatically inserts his/her username in the name slot of the booking. Username is usually not he customers real name, which I have to know.

    Is there a way to force the name field to be empty? It is required, so the clients will fill it with their real name when they book an appointment.

    Thank you!

    https://wordpress.org/plugins/appointments/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey there Eetu,

    How are you doing today?

    You should be able to achieve this with some custom code. Please try adding the following to the bottom of your theme functions.php or you can add it as a mu-plugin:

    <?php
    
    function my_app_test_ajax_clear_name () {
    	?>
    <script>
    ;(function ($) {
    
    	function do_stuff () {
    		$("input.appointments-name-field-entry").val('');
    	}
    
    	$(document).ajaxSend(function(e, xhr, opts) {
    		if (!opts.data) return true;
    		if (!opts.data.match(/action=pre_confirmation\b/)) return true;
    		xhr.success(do_stuff);
    	});
    })(jQuery);
    </script>
    	<?php
    }
    add_action('wp_footer', 'my_app_test_ajax_clear_name');

    This should make Your Name field empty.

    Hope this helps 🙂

    Cheers,
    Bojan

    Thread Starter EB

    (@eiabergm)

    Thread Starter EB

    (@eiabergm)

    Thanks, it works!

    Glad I could help 🙂

    Cheers,
    Bojan

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Customer name not registered’ is closed to new replies.