TOPIC:

limit submits per course and date 2 weeks 5 days ago #259804

  • Topic Author
  • Ulla9
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 12
  • Thanks: 0
I maintain the website of a yoga school. I have to limit the number of participants per course. I have several forms on one page. Furthermore, I already use a script that restricts the selection of the days of the week.
Here is my 1st question: Can I write several scripts in formparts simply among each other or maybe this is already my mistake. Maybe another sytax?
Because, second question:
I have to limit the number of participants per course and day of the week to 9.
I tried everything I found here but it doesn´t work.
Maybe I can do the rest, finetuning on my own. (I wanted then an output field, which, after entering the participation date, shows the still free places. If 0, a text or maybe another form with a waiting list appears.
Anybody there who can help me? In the meantime I’m a little bit under time pressure thanks better corona-numbers.
Thanks for any help!

Please Log in or Create an account to join the conversation.

limit submits per course and date 2 weeks 3 days ago #259818

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6086
  • Karma: 3
  • Thanks: 429
Hi,

1) basically, you can add several scripts among each other, please be aware with the code.

2) for this you can use responsive calendar, please check this:
crosstec.org/en/forums/1-forums/115717-booking-form.html#194228
Here is a useful example, but if you want to test it, you should to find another ID for calendar (#ff_elem15965), because on export calendar ID is changed.

To find ID do the right click to your browser->Inspect->Console->find ID for calendar.

Hope this helps

Regards,
Tihana

Please Log in or Create an account to join the conversation.

limit submits per course and date 2 weeks 1 day ago #259998

  • Topic Author
  • Ulla9
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 12
  • Thanks: 0
sorry for answering so late. Have some problems with my computers. Thank you for your answer.

I use the responsive calendar yet. And I found this piece of script but I don´t think that it fits or am I wrong?.
here an example:
every wednesday there is a pilates class from 9 am to 10am -> the form to book it contains the responisve calendar which gives the choice of wednesdays to choose. Submit means to book and pay the course. clear

Now the user chooses - for example - the 16th of june. (Next one the 9th for example and so on ...)

click submit and book 16th of june
What functions now should start (I think so)

1. system checks wether a variable named "2021-06-16" exists already (must have the minimum value of "1" logically).
If this exists already, a variable named "limit" with the value "9". exists too.
In this case the system has to increase the value of the date, here "2021-06-16" with +1 and has to compare with the value of "limit" (This is the limit for the allowed subscriptions per day and course.). If value of limit == value of 2021-06-16 (9=9) then disable submit and echo " we reached the limit, sorry".

If not such varables exist the system should create "2021-06-16" with the value 1 (or 0 +1) and limit with 9.

I can't make these functions. Pherhaps I made a thinking error. And I hope my english is good enough to understand what I mean. I would be very happy if anybody could help me.

greetings

Please Log in or Create an account to join the conversation.

limit submits per course and date 1 week 6 days ago #260029

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6086
  • Karma: 3
  • Thanks: 429
Hi,

Basically, you can disable all days except Wednesday, then people can select only Wednesday, and for limit you can use script from message above, because we need to check if this date is checked and saved in database or not

Please test it, and if you get in stuck, let me know

Regards,
Tihana

Please Log in or Create an account to join the conversation.

limit submits per course and date 1 week 2 days ago #260220

  • Topic Author
  • Ulla9
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 12
  • Thanks: 0
thank you and sorry for answering so late. Since I made a complaint against a policeofficer I have a lot of security issues and working on my computers is pretty complicated.

I see what you mean and try it.
Thank you
Ulla

Please Log in or Create an account to join the conversation.

limit submits per course and date 1 week 1 day ago #260240

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6086
  • Karma: 3
  • Thanks: 429
Hi,

ok, if you need more help, please let me know

Regards,
Tihana

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.049 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!