Now I want to unset (in the onsubmit php field) what is done in the autogenerated code by chronoforms. So when the form has been sent, the $inum will be empty again. Btw, this also is done when I clear the cache of joomla.
I have tried EVERYTHING in the passed 2 1/2 weeks, but can't seem to get it to work. Can anybody help me to unset what is set below? Help would be SO MUCH appreciated.
The code from the autogenerated form:
<?php
$MyForm =& CFChronoForm::getInstance("customer_form");
if($MyForm->formparams("dbconnection") == "Yes"){
$user = JFactory::getUser();
$row =& JTable::getInstance("chronoforms_customer_form", "Table");
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16).md5(uniqid(mt_rand(), true));
JRequest::setVar( "recordtime", JRequest::getVar( "recordtime", date("Y-m-d")." - ".date("H:i:s"), "post", "string", "" ));
JRequest::setVar( "ipaddress", JRequest::getVar( "ipaddress", $_SERVER["REMOTE_ADDR"], "post", "string", "" ));
JRequest::setVar( "uid", JRequest::getVar( "uid", $inum, "post", "string", "" ));
JRequest::setVar( "cf_user_id", JRequest::getVar( "cf_user_id", $user->id, "post", "int", "" ));
$post = JRequest::get( "post" , JREQUEST_ALLOWRAW );
if (!$row->bind( $post )) {
JError::raiseWarning(100, $row->getError());
}
if (!$row->store()) {
JError::raiseWarning(100, $row->getError());
}
$MyForm->tablerow["jos_chronoforms_customer_form"] = $row;
}
?>