https://www.tassos.gr/docs/convert-forms/security/ensure-a-unique-value-is-entered-into-a

ISSUE:

So you have a mailing list and you only want the person to be able to subscribe once.

To ensure a form field has a unique value, copy the code shown below and place it into the PHP Scripts -> Form Process area of your form.

// Enter the Field Name to search against
$unique_field_name = 'email';

// Enter the error message that will appear when the same value has already been submitted
$unique_field_error = 'A form with this value has already been submitted';
   
// Do not edit below
$unique_post_value = $post[$unique_field_name];

if (!$submissions = ConvertForms\Api::getFormSubmissions($form['id']))
{
    return;
}

foreach ($submissions as $key => $submission)
{
    if (!isset($submission->params->$unique_field_name))
    {
        continue;
    }

    $submission_unique_value = $submission->params->$unique_field_name;

    if ($unique_post_value == $submission_unique_value)
    {
        throw new Exception($unique_field_error);
    }
}

WE LOVE JOOMLA

Joomwalker is not affiliated with or endorsed by the Joomla Project or Open Source Matters.
The Joomla name and logo are used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.