Ok, got the error message to display by changing the two:
add('xxxx'
to
add_session('xxxx'

in this section:


PHP Code:
//rmh referral start
    
if ((REFERRAL_REQUIRED == 'true') && (is_numeric($source) == false)) {
        
$error true;

        
$messageStack->add_session('login'ENTRY_SOURCE_ERROR);
    }

    if ((
REFERRAL_REQUIRED == 'true') && (DISPLAY_REFERRAL_OTHER == 'true') &&($source == '9999') && (!zen_not_null($source_other)) ) {
        
$error true;

        
$messageStack->add_session('login'ENTRY_SOURCE_OTHER_ERROR);
    }
//rmh referral end 
Now the error message stack displays but the form still gets cleared/reset. How can I prevent this resetting? It does not happen with any other field empty....