Moving a Custom field above the Google Calendar Button

Hi there,

I need to move the custom 'reason for appointment' field above the Google Calendar button when booking an appointment. Please advise how to do this as nothing is working.

http://cosmicbermuda.com/_Sites/c1-appointments/

  • Michael Bissett

    Hey @Krista, hope you're doing well today! :slight_smile:

    For this, we'll need to edit the plugin code a bit, so you'll want to note down the changes made, as they'll be lost on an update.

    Inside of lines 1820-1825 of:

    /appointments/includes/class_app_shortcodes.php

    You'll want to change this:

    $ret .= '<div class="appointments-gcal-field" style="display:none">';
    		$ret .= '<label><span>'.$appointments->gcal_image.'</span><input type="checkbox" class="appointments-gcal-field-entry" id="' . esc_attr(apply_filters('app-shortcode-confirmation-gcal_field_id', 'appointments-field-customer_gcal')) . '" '.$gcal_checked.' />&nbsp;';
    		$ret .= $gcal;
    		$ret .= '</label></div>';
    		$ret  = apply_filters( 'app_additional_fields', $ret );
    		$ret .= '<div style="clear:both"></div>';

    To this:

    $ret  = apply_filters( 'app_additional_fields', $ret );
    		$ret .= '<div style="clear:both"></div>';
    		$ret .= '<div class="appointments-gcal-field" style="display:none">';
    		$ret .= '<label><span>'.$appointments->gcal_image.'</span><input type="checkbox" class="appointments-gcal-field-entry" id="' . esc_attr(apply_filters('app-shortcode-confirmation-gcal_field_id', 'appointments-field-customer_gcal')) . '" '.$gcal_checked.' />&nbsp;';
    		$ret .= $gcal;
    		$ret .= '</label></div>';

    That should do the trick. :slight_smile:

    Let me know if this helps please!

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.