Hi THe form is working well BUT the page two message is not complete - this is set up in form piece but is not running because of the exit; in the END SUBMIT code. If i remove the exit; the joomcrm record is not created - I need tom move things around to make it work - can you help? this is my END SUBMIT code $this->execPieceByName('ff_InitLib'); $session = JFactory::getSession(); if(!ff_getSubmit('subscribe')) return; // souscription est le nom de la checkbox include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_acym'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php'); $userClass = new AcyMailing\Classes\UserClass(); $myUser = new stdClass(); $myUser->email =ff_getSubmit('email'); //email est le nom du champ de réception de l'e-mail de l'utilisateur // If the user already exists update it $existingUser = $userClass->getOneByEmail(ff_getSubmit('email')); if (!empty($existingUser)) $myUser->id = $existingUser->id; //Get firstname value $fn = ff_getSubmit('firstName'); $em = ff_getSubmit('email'); //Set session value $session->set('fname', $fn); $session->set('email', $em); $myname = ff_getSubmit("firstName")." " . ff_getSubmit("surname"); $myUser->name = $myname; $customFields = []; $customFields[4] = ff_getSubmit("firstName"); $customFields[5] = ff_getSubmit("surname"); $myUser->confirmed = 1; $userClass = acym_get('class.user'); $subid = $userClass->save($myUser, $customFields); $listid = ff_getSubmit('url_var'); $subscribe = array($listid); // the acymailing list to add to $newSubscription = array(); if(!empty($subscribe)){ $userClass->subscribe($subid, $subscribe); } $myname = ff_getSubmit("firstName")." " . ff_getSubmit("surname"); //please replace nameofeleemntforfirstname with name of element for first name, and nameofelementforlastname with name of element for last name $myUser->name = $myname; $customFields = []; $customFields[4] = ff_getSubmit("firstName"); $customFields[5] = ff_getSubmit("surname"); $customFields[6] = ff_getSubmit("postcode"); $myUser->confirmed = 1; $userClass = acym_get('class.user'); $subid = $userClass->save($myUser, $customFields); $listid = ff_getSubmit('url_var'); $subscribe = array($listid); // indiquez ici les id de vos listes de diffusion séparées par une virgule (3,4,5)… $newSubscription = array(); if(!empty($subscribe)){ $userClass->subscribe($subid, $subscribe); } // this creates the company and person in joomcrm $this->execPieceByName('ff_InitLib'); echo '
'; //exit; THIS IS MY Form Piece - BEFORE Form $this->execPieceByName('ff_InitLib'); $param = JRequest::getVar('sel'); // Get the value of the url parameter ff_setValue('url_var',$param); // Send the value in the "url_var" field); $param2 = JRequest::getVar('oid'); // Get the value of the url parameter ff_setValue('crm_owner_id',$param2); // set up the successful message $session = JFactory::getSession(); if( JRequest::getInt( 'ff_status', -1 ) == 0 ){ $val = $session->get('fname'); $val2 = $session->get('email'); echo 'Thanks '.$val .','; echo "
"; echo "
"; echo 'You will receive an email in your Inbox in the next couple of minutes addressed to '.$val2; echo "
"; echo "
"; echo"If you have any questions, please don’t hesitate to get in contact."; echo "
"; echo "
"; echo "Until next time, "; echo "
"; echo "
"; echo "Have a great day"; }