I've isolated the problem to some code. the story....
I'm creating a way for people to post an event and let people register for it. In the form that reserves the person spot, I have some restrictions set using the SQL plugin. The restriction checks if the event a person is reserving the spot for actually exists, if not, shows a "event does not exist button
SELECT id FROM #__cck_store_form_orchard_event WHERE id= $cck->getValue('orchard_event_id');
The event planner can also set an option that allows them to approve an attendee before they are allow to come. I'm using a BeforeStore to check and manage this. When the user registers for the event, I'm checking the event table to see if the user needs approved by the and if so, sets the information in the attendees record.
// Check to see if approval is required
$dbGetApproval = JFactory::getDbo();
$queryApproval= $dbGetApproval ->getQuery(true);
$queryApproval->select($dbGetApproval ->quoteName('orchard_event_require_attendee_approval'));
$queryApproval->from($dbGetApproval ->quoteName('#__cck_store_form_orchard_event'));
$queryApproval->where($dbGetApproval ->quoteName('id') . ' LIKE ' . $cck->getValue('orchard_event_id'));
$dbGetApproval ->setQuery($queryApproval);
$resultApproval = $dbGetApproval ->loadResult();
//Set the correct information
if($resultApproval == "No")
{
$a = "Yes";
}
else
{
$a = "No";
}
//Save the info into the atendees row
$name = $fields['orchard_event_attendee_approved']->storage_field;
$table = $fields['orchard_event_attendee_approved']->storage_table;
$config['storages'][$table][$name] = $a;
The $cck->getValue('orchard_event_id') is coming from the URL in a param /index.php/reserve-event-seat?eventid=65 I have the Live Value set up to capture the URL param.
If I remove the code, the submit buttons work fine, but then I don't get what I need. I need to figure out what is wrong with the code.
Thanks, for your help.