booking form 5 years 4 months ago #193977

  • Topic Author
  • mozart2
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 30
  • Thanks: 0
hi there,

is it possible that in the booking form you can populate the calendar and see the availability?

thanx for reply


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

booking form 5 years 4 months ago #194228

  • lovre's Avatar
  • lovre
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2667
  • Karma: 76
  • Thanks: 329

maybe you will find this for a good start and a foundation to build upon.

I've built a form where you submit results for the arrival and the departure. The dates selected previously by the users get disabled. This way you get a availability overview and a somewhat of a base system for a serious booking application.

You can go right ahead and integrate this form with ContentBuilder and create a availability/bookers overview as you wish. Your users could then edit submissions, you could limit their permissions to a number of edits/submits...and much more.

The form definitely needs more work if it's going to be used on real projects... There are a few crucial parts missing, such as few validations to keep the user data valid...Maybe even a Administration system... A confirmation process would be a must. I think this could be done easily with CB also.

The whole code is in the forms before form piece:
$db = JFactory::getDBO();
$sql = "SELECT value FROM #__facileforms_subrecords WHERE name='bookingIn' OR name='bookingOut' ORDER BY id ASC";
$rows = $db->loadObjectList();
$size = count($rows);

for ($i = 0; $i < $size; $i++) 
	$string = $rows[$i]->value;
	$pieces = explode("-", $string);
	$string = implode(",", $pieces);

	if (!($i % 2)) $result .=  '{ from: ['.$string.'],';
	else  $result .=  ' to: ['.$string.'] },';
echo '<script type="text/javascript">
		JQuery(document).ready(function () {
				format: "yyyy-mm-dd", 
				selectYears: 60,
				disable: ['.$result.'],
				min: true,
				selectMonths: true,
				editable: true,
				firstDay: 1,
				onSet: function() {JQuery("#ff_elem15965").val(this.get("value"));}
				format: "yyyy-mm-dd", 
				selectYears: 60, 
				disable: ['.$result.'],
				min: true,
				selectMonths: true,
				editable: true,
				firstDay: 1,
				onSet: function() {JQuery("#ff_elem15966").val(this.get("value"));}
so we're basically checking the DB to see previous submissions and build up a string to pass to the calendar disable parameter.

I've attached a form to the post... Just download, unzip and install to your BFs, it should work out of the box.

If you need some help/hints on how to get this to the next level do not hesitate to ask.

EDIT: Unfortunately the form doesn't work out of the box... You will need to get your calendar elements' HTML ID's from the frontend and replace them in the need to replace the: ff_elemXXXX_calendarButton AND ff_elemXXX because BFs assigns new ids to elements on an install.


Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Need to renew Pro Support?
Buy Here!
Consider a membership!
Like us on Facebook

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

Last edit: Post by lovre.
  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.044 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










Apprendre BreezingForms (French Community)

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

Questions et réponses sur les forums de l'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 with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!