Skip Navigation

[Gelöst] Booking form

This support ticket is created vor 3 Jahre, 11 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 11 Antworten, has 3 Stimmen.

Last updated by leilaG vor 3 Jahre, 10 Monate.

Assisted by: Minesh.

Author
Artikel
#1626417

We have a toolset form for our visitors, currently we have a radio button field to ask if the visitor will need parking, if they click yes another radio button field is shown with AM / PM / ALL DAY Options.

We have a total of 12 spaces available per day.

- Is there a way for the form to check if there are spaces available and to show fully booked message
- Is there a way to limit spaces to 2 per day per form field 'Company Name'

#1627305

Jamal
Supporter

Languages: Englisch (English ) Französisch (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello @leilag and thank you for contacting the Toolset support.

I must say that booking logic is sometimes tricky to implement. Booking algorithms may be very difficult depending on how generic they would be. WooCommerce Bookings, as an example, uses 4 custom post types, internal taxonomies, specific custom code to offer a wide range of booking use cases. Check these links for a tutorial that is probably very close to your use case and additional use cases:
- https://docs.woocommerce.com/document/bookings-use-case-fishing-rental-shared-resources/
- https://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-extensions/woocommerce-bookings/use-cases/

So, I'll need more details on your use case before saying if this can be done by Toolset only with the user interface, or if it may need custom code, or if Toolset won't be of bigger help.

I would like to know what post type this form creates? What does the form do?
What do you mean by limiting spaces to 2 per day per field 'Company Name'?

In the meantime, I would like to share some documentation and previous cases about limiting posts creation for users.
- https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/#how-do-i-prevent-users-from-creating-more-than-one-contractor-post
- https://toolset.com/forums/topic/limit-the-number-of-posts-submitted-by-registered-customers-ii/
- https://toolset.com/de/forums/topic/limit-the-number-of-posts-submitted-by-registered-customers/#post-368894

#1638821

Hi Jamal

What post type this form creates? Visitor posts

What does the form do? It creates a visitor post and we display a list of the visitor detail in a view, email notifications are sent to the visitor, the person booking the visitor and our team

What do you mean by limiting spaces to 2 per day per field 'Company Name'?
We have a field 'Company Name' that is auto filled from the user profile and need to to limit the number of spaces a company can book per day

#1641593

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Jamal is on vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.

Can you please give more details aboout spaces. How user will book the spaces? Is spaces is a field added to form, if yes, can you please share problem URL.

#1642923

Hi Minesh, We have a visitor form already that we would like to add car parking booking, the spaces are parking spaces.

It's been added to the form yet, as I wanted to check the possibilities first.

#1642933

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

We have a total of 12 spaces available per day.
==>
Where and how you store this 12 spaces?

If you can share more information about your flow with page links that will help me to understand your issue as well as please share the access details so that I can review your structure.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1643399

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I got it but when you select "Yes", as you do not configure the parking space yet.

Will parking space will be a text field only or something else? what information you want to store as parking space?

#1643479

Yes perhaps numbered spaces, Space 1, Space 2, Space 3 or their Car registration as we need to collect that.

So if the visitor arrival date is 29/05/2019

It should show if there are spaces available and then they can select AM/PM/ALL DAY

If possible we would also like restrict it to 2 spaces per day per 'Company' (we have a field 'Company' that pulls through the company from the users profile.

#1643923

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

The thing is that currently is no way to identify what spaces are booked.

What if you create custom post type Spaces where you should add 12 post, one post for each space and then create one-to-many relationship between post type Spaces and Visitors.

Now, with the page "Book Space" you should display/list only available spaces post (I mean where there is no active child visitor entry available) and with each Space item you should display link to your form "Add Visitor".

Will that help?

#1646631

Okay, so can it work the other way round, where the user can see the spaces available in the visitor form?

#1647755

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

No, as the flow here is little bit different. You will display the link to "Book Space" the space for only available spaces and when you click on "Book Space" you should be redirected to your form of "Add Visitor'.

Please note that as there is no such native functionality available it might be possible that at some stage you need to add some custom code.

#1650169

Okay thank you for the suggestions.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.