• I have added a set of custome fields in functions.php:
    // Add Fields To Salon Booking Checkout
    add_filter(‘sln.checkout.additional_fields’,function(){
    return array(
    ‘custom_field_a’=> array(
    “label” => ‘Vehicle Make’,
    “type” => ‘text’,
    “width” => ‘full’,
    “default” => ”,
    “customer_profile” => true
    ),
    ‘custom_field_b’=> array(
    “label” => ‘Vehicle Model’,
    “type” => ‘text’,
    “width” => ‘full’,
    “default” => ”,
    “customer_profile” => true
    ),
    ‘custom_field_c’=> array(
    “label” => ‘Vehicle Year’,
    “type” => ‘text’,
    “width” => ‘full’,
    “default” => ”,
    “customer_profile” => true
    ),
    ‘custom_field_d’=> array(
    “label” => ‘Comments’,
    “type” => ‘textarea’,
    “width” => ‘full’,
    “default” => ”
    ),
    ‘custom_field_f’=> array(
    “label” => ‘Drop Off Vehicle?’,
    “type” => ‘select’,
    “options” => array(‘Wait’,’Drop Off’),
    “width” => ‘full’,
    “default” => ‘Wait’
    )
    );
    });

    They worked great until a recent update. Now in the admin when you try to edit an appointment, if a custom field is set to “Required” it will not save the whole appointment. Turning the custom field(s) to not “Required” allows the form to save.
    Additionally when you try to create an appointment in the backend I am unable to even fill-out a custom field irregardless of it being “Required” are Not Required”.

    Update: I looked deeper and the custom fields are being recorded to db but are NOT showing in the admin for the appointment. The email sent to customer/admin contains the custom field data but it is not shown in the edit appointment popup.

    • This topic was modified 5 years, 3 months ago by mikestemple.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Dimitri Grassi

    (@wordpresschef)

    Hi,

    we are going to verify this.

    i have the same behaviour….bookings ready to be approved by admin cant be approved via wordpress backend…as long as custom field required…i need this required for GDPR…

    If you log in in the app, the appointment is able to be approved…no problem…but the app also dont shows or checks the custom fields… ??

    Update: i figured out a solution to make it work ( again… ) …delete all your custom files…from your functions.php…make a test round with the form…

    if its running clean without the custom fields, insert the code in the end of functions php…

    add_filter(‘sln.checkout.additional_fields’,function(){
    return array(
    ‘custom_field_a’=> array(
    “label” => ‘I agree…Datenschutzerkl?rung.‘,
    “type” => ‘checkbox’,
    “width” =>’full’
    )

    );
    });

    …after this NEVER uncheck the box in the admin settings again…as long as you dont touch the box, the bookings stay editable/confirmable….

    fixed the story for me…looks like variable “1” is set properly first time, but after unchecking and rechecking the box its not getting set…again…

    hope it helped…

    Thread Starter mikestemple

    (@mikestemple)

    Thanks for update @medialarts but this will not work for my client. They are a large franchise using Multisite and each location requires different form fields to be required/not-required.

    Still waiting for an official fix….

    Thread Starter mikestemple

    (@mikestemple)

    This bug still exists with 3.5.1 beta version. If you have any custom fields set in functions.php AND make them required in settings/checkout you will not be able to edit the appointments in the backend in calendar view and in the edit bookings view.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug with custom fields being required’ is closed to new replies.