//Form pieces - 
// Load the standard Facile Forms library
$this->execPieceByName('ff_InitLib');

// Get the fields that create the hash (userID,company,first,last)
$frm_userID = ff_getSubmit('hdnUserID');
$frm_company = ff_getSubmit('txtCompany');
$frm_first = ff_getSubmit('txtFirstName');
$frm_last = ff_getSubmit('txtLastName');

// Create a hash of the values by appending them together and the running md5
$hash = $frm_userID .$frm_company .$frm_first .$frm_last;
$hash = md5(strtolower($hash));

// Record the hash to the form so that it will save into the database
ff_setValue('hdnUniqueID', $hash);