• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

enable/disable days in element date

OK, I just tried logging in to the backend again, and it took almost 45 seconds just to log me in.

I'm going to reboot my laptop, my router and my cable modem, just to be sure it's not some issue on my network.

--hugh
 
hugh, I'm on skype, please contact me there. if going very slow, make a copy with Akeeba. I have no problems from here to access the backend.
 
Guys, you are a thousand things, but a month I'm trying to do this and I already ends on time.
This client is very important to me, and do not want to lose.
If hugh is very busy, you can help someone else?
 
Here's a summary of what we did to get this to work:

Created a form PHP plugin, run at the top of the form with this php

PHP:
<?php
// Query the database to get the events:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*')->from('imagina_canal')->where('Cantidad_de_inscripciones > 0');
$db->setQuery($query);
$rows = $db->loadObjectList();
$json = array();
 
foreach ($rows as $row)
{
$key = $row->Regiones_cascading . '.' . $row->Ciudades_cascada;
 
if (!array_key_exists($key, $json))
{
$json[$key] = array();
}
 
$date = JFactory::getDate($row->fecha);
$json[$key][] = $date->toISO8601();
}
 
// Inject the events into the browser as a global Javascript variable.
 
echo '<script type="text/javascript">';
echo "inscriptionEvents = " . json_encode($json);
echo '</script>';

Edit the calendar date element and set the allow js script

JavaScript:
var els = Fabrik.getBlock('form_1').elements;
var region = els.inscrpcion___Region_cascadin.get('value');
var city = els.inscrpcion___ciudad_cascading.get('value');
var key = region + '.' + city;
 
// Get the data created by the PHP plugin
var allowedDates = inscriptionEvents[key];
var result = true;
 
date = new Date(date);
if (typeOf(allowedDates) !== 'null') {
for (i = 0; i < allowedDates.length; i++) {
var td = new Date(allowedDates[i]);
if (date.getUTCFullYear() == td.getUTCFullYear() && date.getUTCMonth() == td.getUTCMonth() && date.getUTCDate() == td.getUTCDate()) {
// A date has been found.
result = false;
}
}
}
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top