• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Unique registration number only one use

Unique registration number only one use 13 years 2 months ago #16410

  • rubenl
  • rubenl's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Hi,


I need to validate an unique registration number, that can be done easily (www.rsjoomla.com/support/documentation/v...stration-number.html). But I want that this code only can be used once, an unique field validation. But how can I validate a text field twice or combine those to validations.

Code unique registration number is:
function registrationCode($param,$extra=null)
{
$validCodes = array('AAAA','BBBB','CCCC','DDDD');
$bul = true;
foreach($validCodes as $validCode)
if(strtolower($validCode) == strtolower($param))
{
$bul = true;
break;
}
else
$bul = false;
return $bul;
}

Code unique field is:
function uniquefield($value, $extra=null,$data=null)
	{
		$db 	=& JFactory::getDBO();
		$form   = JRequest::getVar('form');
		$formId = (int) @$form['formId'];
 
		$db->setQuery("SELECT `SubmissionValueId` FROM #__rsform_submission_values WHERE FormId='".$formId."' AND `FieldName`='".$db->getEscaped($data['NAME'])."' AND `FieldValue`='".$db->getEscaped($value)."'");
		return $db->loadResult() ? false : true;
	}
The administrator has disabled public write access.

Unique registration number only one use 12 years 5 months ago #20143

  • sakisdem
  • sakisdem's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
I really want answer to this topic
Can anyone help us?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!