• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Value of sum reservations.

Value of sum reservations. 6 months 4 days ago #43049

I added in a form bij </>Scripts the following code

$max = 300;
// Get a database connection.
$db = JFactory::getDbo();
$db->setQuery("SELECT SUM(`FieldValue`) FROM #__rsform_submission_values WHERE `FormId`='".(int) $formId."'"." AND `FieldName`='Aantal_kaarten'");
$reservations= $db->loadResult();
if ($reservations>= $max) {
$formLayout = 'Sorry, the max reservations arrived..';
}

This ensures that we do not receive more than 300 reservations
Works fine

But now I want to use the value of $reservations
in a Module: mod_rsform_list
I can let show there all the reservations, but is it possible the show there also the summed reservations as in the code above $reservations ?

Or if it is not possible in de mod_rsform_list, just a value on the original entry form
Last Edit: 6 months 3 days ago by website67.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!