'always' | 'when_changed' * 'scope' = 'form' - saved only via Save Form into settings_json field (e.g. { "options": { "key":"value" } }) in the Table: wp_booking_form_structures * 'scope' = 'ui' - UI-only (no DB save) * * * @package Booking Calendar. * @author wpdevelop, oplugins * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @since 11.0.x * @file ../booking/includes/page-form-builder/form-settings/options-defs.php * * @modified 2026-01-24 20:12 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Print Settings Options groups. */ function wpbc_bfb_ui__settings_options__print() { // ====================================================================== // == Group: Basic // ====================================================================== $panel_id_basic = 'wpbc_bfb_form_settings_panel_basic'; ?>
'toggle', 'key' => 'booking_use_bfb_form', 'scope' => 'global', 'save_ui' => 'when_changed', // always | when_changed. 'default' => get_bk_option( 'booking_use_bfb_form', 'On' ), 'label' => __( 'Drag & Drop Form Builder', 'booking' ), 'help' => __( 'Enables the new drag & drop form builder. Disable this option to use the classic booking form. Reload the page, after saving.', 'booking' ), 'attr' => array(), ) ); WPBC_BFB_Setting_Options::print_option( array( 'type' => 'toggle', 'key' => 'booking_timeslot_picker', 'scope' => 'global', 'save_ui' => 'always', // always | when_changed. 'default' => get_bk_option( 'booking_timeslot_picker', 'On' ), 'label' => __( 'Time picker for time slots', 'booking' ), 'help' => __( 'Show time slots as a time picker instead of a select box.', 'booking' ), 'attr' => array( 'id' => 'wpbc_bfb__toggle_booking_timeslot_picker', 'class' => 'js-toggle-timeslot-picker', ), ) ); WPBC_BFB_Setting_Options::print_option( array( 'type' => 'toggle', 'key' => 'booking_is_use_autofill_4_logged_user', 'scope' => 'global', 'save_ui' => 'when_changed', // always | when_changed. 'default' => get_bk_option( 'booking_is_use_autofill_4_logged_user', 'Off' ), 'label' => __( 'Auto-fill fields', 'booking' ), 'help' => __( 'Prefill form fields with the current user’s details when the user is logged in.', 'booking' ) . ' ' . __( 'Click Preview to see it in action.', 'booking' ), 'attr' => array( 'id' => 'wpbc_bfb__checkbox_autofill_4_logged_user', ), ) ); ?>