Pre-Sales Questions
It's one time cost. You can use your purchased version of Booking Calendar as long as you need on your website.
Also, you can request free updates your version of Booking Calendar (if such updates ready) during 6 months after initial purchase of plugin.
If you will need to extend period of support and getting updates to next 6 months, it will cost 50% from the original cost of your Booking Calendar version (original cost - its cost of Booking Calendar version without other discounts).
Optional subscription of getting updates with discounted cost.
Please note, during initial purchase of plugin, its possible to select (or deselect) optional subscription (billing each 6 months) for getting Updates and Support for plugin with additional discount. First 6 month during initial purchase of plugin, getting of updates is for free. Possible to cancel subscription of getting updates at any time.
If you was not selected subscription of getting "Updates and Support" during initial purchase, and if you will need (in a future) to extend period of support and getting updates to next 6 months, it will cost 50% from the original cost (original cost - its cost of Booking Calendar version without other discounts).
You can request new update of Booking Calendar on this page.
If my subscription for updates has expired or is canceled, will the plugin continue to work?
Yes, the plugin will continue to function as before, but you won't receive free updates for Booking Calendar.
While the plugin should work with your current WordPress version, there is a potential risk of conflicts with future WordPress updates. We can't predict the changes in future WordPress updates, and older plugin versions may experience issues.
To ensure the best performance, prevent potential compatibility or security issues, and keep your bookings safe, we strongly recommend keeping your Booking Calendar up-to-date and maintaining an active subscription for the latest updates and support.
Upon the initial purchase of the plugin, you can request free updates for your Booking Calendar version (if updates available) within 6 months after initial purchase of plugin. Additionally, alongside this purchase for receiving the latest update, you can activate an optional subscription at a discounted rate.
Optional Subscription for Updates:
1) When purchasing the plugin initially, you have the option to select or deselect an optional subscription for updates and support, billed every 6 months. For the first 6 months after the initial purchase, updates are provided for free. You can cancel this subscription at any time.
2) If you did not select the subscription for updates and support during the initial purchase, or if your subscription was canceled or expired, and you later need to extend the period of support and updates for the next 6 months, it will cost 50% of the original cost of the Booking Calendar version, without any additional discounts applied. Additionally, the system offers further discounts for subsequent subscription charges every 6 months.
However, the initial charge for this update is 50% of the original Booking Calendar cost ( without any additional discounts applied ).
You can request the latest update of the Booking Calendar on this page.
Yes, its possible to make upgrade from lower version to the higher versions of the same editions (for example from the Booking Calendar Personal single site usage version to the Booking Calendar Business Small single site usage version).
But its does not possible to make upgrade from the single site usage version to the "developer" or multi site usage versions or from the "developer" to the multi site usage versions.
The cost of upgrade from the lower to higher versions, usually higher than difference in cost between 2 versions.
The cost of upgrade from the lower to higher versions of single site usage versions higher on $5 than difference in cost between 2 versions.
The cost of upgrade from the lower to higher versions of "developer" edition versions higher on $10 than difference in cost between 2 versions.
The cost of upgrade from the lower to higher versions of multi site usage versions higher on $15 than difference in cost between 2 versions.
Booking Calendar offers a range of versions and editions to suit different needs. It's important to distinguish between the versions, which determine the functionality, and the editions, which specify the number of websites on which you can use the plugin.
Editions:
Each version can be obtained in different editions, which dictate how many websites you can use the plugin on. The editions include:
Single Site Usage: This edition allows installation and activation on a single, specific website. It's suitable for those who have only one website to manage.
Developer Edition: With the developer edition, you can install and activate the plugin on up to 2 different websites. This is useful for testing on a developer server and a live website.
Multi-Site Usage: The multi-site usage edition enables installation and activation on a maximum of 5 different websites, making it suitable for businesses with multiple online platforms.
You can check overview of different Booking Calendar versions.
You can also check all available features for different versions of Booking Calendar.
Also you can test live demo of specific versions (both client and admin sides) to be sure in functionality and do not have misunderstanding.
Booking Calendar "Free" - this version is free, you can download it from WordPress directory.
It's very easy in use and powerful version for the creating reservation of one resource.
At this version is possible to make reservation for the one resource, like a room or car, or some service... etc. You can insert into the post or page the standard booking form with fixed number of fields and availability calendar, where visitor can select single or multiple days. Administrator and visitor can receive the standard email notifications about different actions, like a "new booking", "approve/decline/... of booking", etc... Administrator can make the booking at admin panel at the "Add new booking" menu page and configure the different settings of the booking form and availability calendar at the general booking settings menu page.
Booking Calendar Personal - it's paid version, where is possible to have booking availability calendar for the each of multiple booking resources (like a room, cars or any services, etc…). You can add new and configure exist fields in the booking form. Also you can configure the email templates for the different booking actions. You can able to edit the exist bookings, add comments to the bookings, print and export bookings to the CSV format, etc… Please check at the feature list and live demo of this version, full list of features of this version.
Booking Calendar Business Small - it's paid version, where is possible all actions from previous versions, plus you can receive the bookings for the specific time of date, set the cost of booking resource and integrate the online payment form of supported payment systems. Your visitors can make the rage days selection using the one mouse click in calendar, or setting minimum or sets of fixed number of days selection using 2 mouse clicks (check in and checkout dates), all middle dates will be selected automatically. Also here is possible to use the same date as check in/out date for the different bookings by activating the fixed time at the settings page.
Please note, if you will use the fixed time slot list selection (and not the time entering using the text fields) in the booking form, the timeslot list will be the same for the any date of week, in other words the fixed time slot list is not depend from the week of day. Also if some visitor will reserve the specific time slot at selected date at specific booking resource (calendar), this timeslot become unavailable for the other visitors at this selected date in this booking resource.
And much more... Please check at the feature list and live demo of this version, full list of features of this version.
Booking Calendar Business Medium - it's paid version, where is possible all actions from previous versions, plus you will have more advanced cost and availability management of the bookings. At this version is possible to set the rates, which will depend from the season filters, plus you can set the more advanced cost for the booking, where cost is depend from the number of selected dates. Also you can set additional cost for the option selection at selectboxes or checkboxes at your booking form. this additional cost can be fixed sum or percent from the final cost of booking. You can even activate and configure for the resources the deposit payment feature, what is mean that visitor will pay at the payment form, the part of the final cost of the booking. This version is also support settings availability per each booking resource, which is depend from the season filters. Also you can able to configure the several customization of booking form fields, it's mean that different resources can have different form fields. You can send the payment requests to visitors for the specific booking by email. And much more.... Please check at the feature list and live demo of this version, full list of features of this version.
Booking Calendar Business Large - it's paid version, where is possible all actions from previous versions, plus you can make the several reservations per the same FULL date (not a time slot) for the same booking resource (availability calendar). At this version is possible to set the capacity of the booking resource, it's mean that your visitors can make the several reservations per the same date, in other words, the date(s) in calendar will be available until lumber of reservations per these full dates is less than capacity of the booking resource. Please note, if you will use the timeslot selection for the booking resource with capacity higher than one, so then this timeslot will be simply record as a data into DB according this booking, but will not impact to the time availability. Also at this version you will be able to search the available booking resources in your pages or posts for the specific check in/out dates and specific number of visitors. This version is also support the coupon codes for getting discounts of bookings. And much more.... Please check at the feature list and live demo of this version, full list of features of this version.
Booking Calendar MultiUser - it's paid version, where is possible all actions from previous versions, plus each registered WordPress user of your site can have independent, individual, own booking admin panel. It's mean that each regular registered WordPress user can see only OWN booking resources and bookings and can configure the own booking form fields and email templates, own payment form integration data and costs of booking resources as some other settings... In this version is exist also the "super booking admin users", which can see and manage the bookings and booking resources from the all users and manage the status of other bookings users. And much more.... Please check at the feature list and live demo of this version, full list of features of this version.
Unfortunately we can not make personal customization or custom development on customer demand. But we can add features, that you need to our TODO list for implementing them in a future updates. You can add your request of specific feature at this page.
Please note, we can not specify some approximate time for implementation of the specific feature.
Thank you for understanding.
Please watch the video guides, check the FAQ, and review previously answered solutions in the plugin support forum before submitting a new question.
If you still have questions about configuring the plugin, you can contact us via support email or through the support forum. Support is available only through email or the support forum. We do not offer assistance via phone or video/audio calls.
Please note that you will receive a response within 24 hours. Typically, our response time is 2-3 hours during working hours (10:00 AM - 6:00 PM UTC+2). If you don’t see a response, please check your SPAM folder, or ensure you contacted us from a valid email address.
We can help with specific questions related to configuration or troubleshooting.
When reaching out, please provide detailed information about your issue. Avoid vague descriptions like "it doesn't work." We can't assist with general questions. Instead, explain the exact issue you're facing or the specific configuration you need help with.
We expect all support requests to be kind, helpful, and respectful. Any violation of this may result in the discontinuation of support for that individual.
Do not send "bumb" emails. Sending "bumping" emails can be reason of delay of responding to such emails. Kindly wait for an answer to your original email before submitting new questions.
Please note that we cannot use login credentials to access your website for testing or configuration purposes. Instead, please provide screenshots or videos of the issue you are experiencing, along with a detailed explanation of how to reproduce the problem.
What support do we NOT provide:
- We do not provide full configuration on the customer's website.
- We do not provide any customization of source code.
- We do not provide HTML, CSS, JavaScript, PHP coding for the Booking Calendar files or any forms in the plugin settings. This is the responsibility of your web developer.
- We do not provide WordPress usage training/teaching, configuration of WordPress websites, or server configuration.
- We do not provide training/teaching on HTML, CSS, JavaScript, PHP, or other programming languages.
- If you have custom code and experience issues, we cannot debug your code or search for mistakes. This is the responsibility of your web developer.
- We cannot assist with questions related to the functionality or configuration of other services or systems. Please seek help from the relevant support team for those services. Our support is focused on the "Booking Calendar" plugin only.
Please be sure to check the terms and conditions for the plugin usage and the support we provide.
We may discontinue support and cancel the active subscription (if applicable) for "support and updates" if the customer violates the plugin's terms and conditions or our support policy, or for other reasons, such as dishonesty, making accusations, or engaging in aggressive or disrespectful communication, among others.
You will receive support and the ability to request free updates for 6 months after initial purchase. After this period, if you do not have active subscription for support and updates and you need it for the next 6 months, it will cost 50% of the original Booking Calendar version cost (original cost – it is cost of Booking Calendar excluding any discounts).
Updated 2025-02-09
Is it possible to specify a date range by season?
e.g. during my high season guests can only check in on a Monday for 4 nights a Friday for 3 its, or Mon/Fri for 7 nights.
Out of high season weekend guests checking in on a Friday must book a minimum of two nights.
I cannot find a way to set up this particular set of rules.
Thank you
Hello.
It's possible to set the different duration of days selection depending from week days or seasons during a year in the Booking Calendar Business Medium or higher versions.
Please check more here https://wpbookingcalendar.com/overview/#advanced-days-selection
Read more about this configuration (at options parameter section) here: https://wpbookingcalendar.com/faq/shortcode-booking-form/#booking-options-condition
Fiz a compra do modulo (( Calendário de reservas pessoal )).
neste link: https://wpbookingcalendar.com/features/#personal, fica claro que no modulo Pessoal, a função: (( indicadores visuais como linhas diagonais ou verticais)) estaria disponivel no modulo Pessoal. Agora fui configurar e a função não esta disponivel. Isso é muito chato, perdi minha compra. Peço que corrigam essa informação para não induzir outro a o mesmo erro.
Hello.
Sorry, but no. At the link that you send is start description of the features of the Booking Calendar Personal version.
Later start description of the features of Booking Calendar Business Small version. Change over days available in this Booking Calendar Business Small or higher versions.
If you scroll down you can see other versions and features that exist in those differnt versions.
Even more in the table price here https://wpbookingcalendar.com/prices/ you can check that change over days feature available only in the Booking Calendar Business Small or higher versions.
Please recheck.
Thank you.
Descordo! veja o link que enviei, a imagem usada para exemplo é uma com reservas na diagonal, embora no texto não apresenta, mas a imagem da tela sim. Ou seja, induz ao erro!.
Hello.

1) In your link the description about the Booking Calendar Personal version.
2) The description about the Change-Over days starting under the section of the Booking Calendar Business Small version at Features page.
Please check the attached screenshot.
3) The very clear description with details about this feature and in what versions exist this feature explained in price description here:
Please check the attached screenshot.
4) If you need the change over days feature, you can contact the support @ wpbookingcalendar.com with description about this,
and we will provide for you very good proposition because of Cyber Mondday discount during today.
Kind Regards.
Hi there,
My form currently has starttime and endtime fields that allow the user to select times between 8 am and 8 pm with 30 min intervals. Currently, if User 1 books 10 am - 11 am, the endtime and startime fields will be greyed out from 10 am to 11 am. However, if User 2 selects a starttime of 8 am, User 2 can still select an endtime of 12 pm. The form will not submit and will display an error, however I was wondering if it's possible to block all the times after a booking to prevent the user from selecting it. So for example, I want it so that if User 2 selects 8 am as a start time, the only available times will be up to 10 am, and all subsequent times will be greyed out.
Thank you!
Hello.
If the subsequent times after 10am are still available (not booked) then it’s will be still possible to select such time for “end time” field. It’s not possible to block those times, in this situation. Sorry.
Or did I misunderstand you?
Kind Regards.
Hi there,
You understood correctly 🙂 Thank you for your quick reply!
Avital.
Feature request:
1. Send an email reminder for upcoming reservations
Could you add an email reminder for upcoming reservations into WpBookingCalendar?
Users should be able to configure the time span for the reminder, allowing flexibility to send it, e.g. 1–30 days before the reservation date.
Additionally, support resource-specific email templates to customize the communication based on the reserved resource.
Hello.
We have developed new plugin - “Email Reminders”, which have similar functionality and native integration with latest versions of Booking Calendar plugin.
Please check more here
https://oplugins.com/plugins/email-reminders/
You can try it. But currently we do not provide support or help with configuration with this plugin. Because of too much work and support with Booking Calendar plugin.
Thank you for understanding.
Is it possible to have duration-based cost for hours instead of days? For example, if an individual books more than 2 hours, than they will receive 10% discount
Hello.
Basically in the Booking Calendar Business Medium or higher versions you can use the start time and duration of time fields for definition time duration of booking and then configure the additional cost for the duration of the booking at the WP Booking Calendar > Prices > Form Options Costs page .
In the Booking Calendar Business Medium or higher versions possible to configure additional costs for selected options in the select boxes or check boxes (such options can be hidden and checked by default). It's useful in case, if you need to add the tax cost or cleaning fee or any other additional cost for the booking. You can configure it at the WP Booking Calendar > Prices > Form Options Costs page. Check more about this feature here: https://wpbookingcalendar.com/overview/#additional-cost
Check this FAQ guide about configuration of additional costs based on time duration: https://wpbookingcalendar.com/faq/configure-additional-costs-for-time-duration/ You can use the same method to configure additional costs for any selected options in select boxes or checkboxes in your booking form.
Kind Regards.
Hello,
I confugured the booking calrnder but when i fill in the form name, tel email it doesnt show the letter i am typing only after i puch enter to go to the next field within the form to fill it in;
Can you please help me.
My hosting is on elemetor and they informed i should contact you
Thank you for your time and advice.
Hello.
Please send the link to your page with booking form, where you are having the issue.
Thank you.
https://empowertruelife.com/book-session/
Hello.
Please add this CSS to your Theme Editor settings.
You can check how to add own CSS customization to CSS Theme Editor here: https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/
Here's the code you need to add:
Please do not forget to clear the browser cache before testing these changes.
https://empowertruelife.com/book-session/
Thats great, it works. Thank you for your help, much appreciated !
If I may, I have a seccond question:
On the configuration of the email approved for example. When i try to configure for other languages it only executes the first default language (english in my case).
I have set up for Romanian for example but it doesnt work:
https://empowertruelife.com/ro/rezervare/
After approval by admin i receive an email confirmation that the reservation is approved in english instead of Romanian.
Hereunder my configuration.
Email content - subject : "Your Session Reservation is Confirmed [lang=ro_RO] Rezervare confirmata"
Can you please also help me with this issue ?
Thank you in advance for all.
Greetings,
Gabriela
Hello.
1) For sending approved email for the booking in a specific language, you need to switch the language of the admin panel, and then press on the approve button.
2) Or in the Booking Listing page click on the "Globe" language icon near a specific booking, then switch language locale, and after that approve the booking.
Kind Regards.
Thank you very much ! It works !
Greetings Gabriela
Hello Team,
just a very quick question as I not found anything in the FAQ.
I would like to "send" the customer contract document with this tool to the customer.
For that purpose I use another tool at the moment (Secure Download), so that the customer can download it from my webspace.
Do you see any chance to implement such feature in the future, or is there alreayd something in I not realised?
E.G. it would be perfect if an "Action" can be added to the booking ID in the Booking Overwiew - Media link to enter - and a [shortcode] in that mail will enter that (secured) downloadlink in the E-Mail Template.
Regards,
Ortwin
Hello.
We will add this feature to the to-do list for having it in future updates of the plugin, but I can not say when this feature will be implemented. Sorry.
Kind Regards.
Many thanks, that would complete the tool functionality for my booking process to 100% with no breakouts to other tools.!!
I forgot to mention also an Upload functionality/link to upload ID card /driver licence and signed contract.
Would be good to put it to the list as well 🙂
Then the tool is unbeatable.
Regards,
Ortwin
Thank you, for the info about these features.
Hope we can add it soon.
Kind Regards.
Turn off the Conformation option.
Dear developers,
Is there a way to switch off the conformation option, when someone books a session?
So, that I do not have to login the backend of my website and approve a booking. 😉
Thanks in advance,
Geoffrey
Hello.
You can enable this option "Auto approve all new bookings" at the WP Booking Calendar > Settings General page in "Auto Cancellation / Auto Approval" section.
It is available in the Booking Calendar Business Small or higher versions. Find more information at this page: https://wpbookingcalendar.com/features/#auto-cancellation
Hi, I bought the business Large version and I was wondering do you have any premade booking forms. I'm having trouble understanding the logic of how to create a form. I basically want a form where schools can book an educational walk around our wetland facilities. WHere they can enter the details of their school and the price will be calculated on the amount of kids attending.
Hello.
1) You can select one of predefined form templates at the WP Booking Calendar > Settings > Booking Form page in toolbar and then click on "Reset" button. After that click on Save changes button.
In cse if you need to add your own form field, then Please use shortcode generator at the right side of the Booking > Settings > Form page for the fast and correct creation of booking form fields.
2) Otherwise you can click on "Simple booking form" configuration and configure your booking form in simple mode, by adding a new form fields.
You can check how to add and fields in the Booking Calendar in simple mode here https://youtu.be/-pOTMiyp6Q8?t=28s
3) Relative defining additional cost for the number of selected studends. You need to add the selection of the number of students as selectbox to your booking form.
And then you need to set additional cost for each of student option at the WP Booking Calendar > Prices > Form Options Costs page.
Check more about this feature here: https://wpbookingcalendar.com/overview/#additional-cost
Check this FAQ guide about configuration of additional costs based on time duration: https://wpbookingcalendar.com/faq/configure-additional-costs-for-time-duration/ You can use the same method to configure additional costs for any selected options in select boxes or checkboxes in your booking form.
Hi devs, I hope that you are well. We have a question regarding different pricing for the same resource.
We have "Business Large SingleSite 10.6"
Our scenario is as follows.
We have a fixed number of beds available (say 10) that can be booked each night but we charge a different price for a member and a non member.
The price per bed is (for example) $10 for members and $20 for non members
A member make a booking for 2 members and 1 non member, this is a total of 3 beds and a cost of $40 and leaves 7 beds available for that night
Another member booking for 4 non members, cost of $80 and leaves 3 beds available
We are aware that this system can be "abused" - ie users can just book all the beds as member for the cheaper price, but this is something that we will deal with IRL.
Could you please provide me some assistance of how I could set up something like this? I was thinking that I could use "visitors" and "children" in the form option costs, but I am not sure how I take the total number booked of the number of beds available?
Thanks in advance.
Dave
Hello.
1) Yes, you can use something similar to adults/children selection and visitors (your beds) selection with additional JavaScript to configure it like this: https://wpbookingcalendar.com/faq/deduction-capacity-for-adults-children-selection/
2) Then configure the additional cost for the adults/children (in your case it's will be members and not members) at the WP Booking Calendar > Prices > Form Options Costs page.
Check more about this feature here: https://wpbookingcalendar.com/overview/#additional-cost
Check this FAQ guide about configuration of additional costs based on time duration: https://wpbookingcalendar.com/faq/configure-additional-costs-for-time-duration/ You can use the same method to configure additional costs for any selected options in select boxes or checkboxes in your booking form.
thanks so much for the quick reply, I will have a look into it and let you know.
Thank you, this all worked as expected.
I am having a slight issue with the Form Option Costs and wonder if you can tell me what I am doing wrong (I can paste full code if needed, just let me know).
I have drop downs for members and non members and everything is working correctly for capacity as expected. I can get the pricing to work by entering a formula into EVERY option for each dropdown and setting it as % of total cost.
However, I have further options that can be booked that are NOT against the capacity, so I have the fields for the cost calculation being filled via javascript (text fields)
Total Members:[text members class:members]
Total Non Members:[text nonmembers class:nonmembers]
I have also tried making the member and nonmember drop downs but I get the same result:
eg:
Total Members:
[select members class:members "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "40"]
Total Non Members:
[select nonmembers class:nonmembers "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "40"]
updateOverallNumbers is called on change of the dropdowns
function updateOverallNumbers() {
const membersBeds = parseInt(jQuery('select.members_beds').val()) || 0;
const nonmembersBeds = parseInt(jQuery('select.non_members_beds').val()) || 0;
const membersCamper = parseInt(jQuery('input.member_campers').val()) || 0;
const nonmembersCamper = parseInt(jQuery('input.non_member_campers').val()) || 0;
jQuery('input.members').val(membersBeds + membersCamper);
jQuery('input.nonmembers').val(nonmembersBeds + nonmembersCamper);
updatePriceHint();
}
function updatePriceHint() {
console.log("updatePriceHint");
const members = parseInt(jQuery('input.members').val()) || 0;
const nonmembers = parseInt(jQuery('input.nonmembers').val()) || 0;
console.log("members " + members);
console.log("nonmembers " + nonmembers);
const resourceCost = 5;
const days = 1;
const expectedCost = (members * (1 * resourceCost)) + (nonmembers * (3* resourceCost)) * days;
console.log("Expected cost: €" + expectedCost);
var resource_id = jQuery("input[name^='bk_type']" ).val();
if (typeof(showCostHintInsideBkForm) == 'function') {
console.log("calling showCostHintInsideBkForm " + resource_id);
showCostHintInsideBkForm(resource_id);
}
}
I was hoping that I could just enter the formula once, so I added a (soon to be) hidden checkbox to the page
Hidden:[checkbox hidden_cost_calc class:hidden_cost_calc default:on ""]
and put the formula in there
([members]*100)+([nonmembers]*300)/day : % of total cost
and left all the other options as 0 € but the cost doesnt alway reflect the selection, on some occasions (and I cannot find a pattern)
When the cost does not update correctly on change, then on the next change it updates to the previous calculation
If I uncheck and check the "hidden" checkbox, it will always update to be the correct cost
(I did try to trigger the change event of the checkbox via JS instead of calling showCostHintInsideBkForm but it is the same result)
https://imgur.com/rKEspki
Any help would be great, thanks in advance.
Dave
Hello.
You need to trigger change action.
So instead of the code like this
Use this
Kind Regards.
Thanks for your reply. I must still be doing something wrong as I still cannot get the cost hint to update correctly even after trigger the change event on the input field.
I can get it to update correctly by "sleeping" the execution as you can see here: https://imgur.com/DOAN16r
I made a simple form to reproduce:
[code]
<!-- Simple HTML shortcodes in the form (check more at "Generate Tag" section):
Row: ... | Columns: ... | Labels: ... | Spacer: -->
[calendar]
Hidden:[checkbox hidden_cost_calc class:hidden_cost_calc default:on ""]
Dates: [selected_short_timedates_hint] ([days_number_hint] - night(s))
Full cost of the booking: [cost_hint]
Adults:[selectbox visitors class:visitors "1" "2" "3" "4" "5"]
Children:[selectbox children class:children "0" "1" "2" "3"]
Total Guests:[text guests class:guests]
[submit "Send"]
function triggerChangeAndWait(selector, value) {
return new Promise((resolve) => {
jQuery(selector)
.val(value)
.trigger('change')
.promise()
.done(resolve);
});
}
function sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
async function updateOverallNumbers() {
console.log("updateOverallNumbers");
const visitors = parseInt(jQuery('select.visitors').val()) || 0;
const children = parseInt(jQuery('select.children').val()) || 0;
jQuery('input.guests').val(visitors + children).trigger("change");
//await triggerChangeAndWait('input.guests', visitors + children);
await sleep(500);
console.log('Change event completed');
updatePriceHint();
}
function updatePriceHint() {
var resource_id = jQuery("input[name^='bk_type']" ).val();
if (typeof(showCostHintInsideBkForm) == 'function') {
showCostHintInsideBkForm(resource_id);
}
}
jQuery('select.visitors, select.children').on('change', updateOverallNumbers);
[/code]
and the cost is set for the hidden_cost_calc
([guests]*100)/day > % total cost
If you can spot what I am doing wrong, please let me know.
Thanks again
Hello.
Additional cost works ONLY on selectboxes or checkboxes or radio button fields.
You try to change value and trigger "change" on text field. Thats why it not works.
Kind Regards.
sorry, I cannot delete the above comment. I realise that I can get this to work as I want it by replacing the shortcodes the generate the dropdowns with plain HTML. this means that the showCostHintInsideBkForm function is NOT getting called twice (once when I select the visitor and again when I trigger the on change event via JS) and this works fine for my needs.
Thanks