Good morning I have a job card with a tracking code as a job card Nr as a hidden input with code
<?php $db = JFactory::getDBO(); $db->setQuery("SELECT count(*) FROM #__facileforms_records where form=8"); return $db->loadResult()+1; ?>
in the Value field.
And I have code in the Begin Submit field in Submit pieces
$this->execPieceByName('ff_InitLib');
JFactory::getSession()->set('breezingforms.code', ff_getSubmit('tracking_code'));
But now the Nr, is stuck at 1. I did change the code in the Value field from
<?php $this->execPieceByName('ff_selectValue'); $value = ff_selectValue("SELECT count(*) FROM #__facileforms_records where form=8"); $value = ($value + 1); return $value; ?>
To
<?php $db = JFactory::getDBO(); $db->setQuery("SELECT count(*) FROM #__facileforms_records where form=8"); return $db->loadResult()+1; ?>
As per previous request
Thanks