TEMA:

Check duplicate value on Table by drop-down 1 año 4 meses antes #273628

  • Autor del tema
  • midimoinsdix
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 100
  • Gracias recibidas: 0
Thank's.
Take all your time because I stick !

I can't adapt this part Ajax part (follow support Dupplicate Email ) with my Drop-menu !

1. Go to Properties of the field that you wish to validate. In the Validation section check the "Required" checkbox and set the Validation type to "Custom". In the code are below that appears, put the following code:
function ff_email_validation(element, message)
{
    if(ff_validemail(element, message) != '') return 'Please enter an email address';
    var myreturn = '';
    JQuery.ajaxSetup({async:false});
    JQuery.post('index.php', { option: 'com_breezingforms', ff_form: ff_processor.form, Itemid: 0, format: 'html', email: element.value }, function(data){ if( data != '1' ){ message == '' ? myreturn = 'Email exists already!' : myreturn = message; } } );
    return myreturn;
}

2. Go to the Advanced properties of the field that you wish to validate. In Actionscript section set Type to Custom and Action to Change. In the code below put the following code:
function ff_email_action(element, action)
{
    switch (action) {
        case 'change':
            JQuery('#bfEmailError').remove();
            if(element.value == '') return;
            var myreturn = '';
            JQuery.ajaxSetup({async:false});
            JQuery.post('index.php', { option: 'com_breezingforms', ff_form: ff_processor.form, Itemid: 0, format: 'html', email: element.value }, function(data){ if( data != '1' ){ myreturn = '<div class="bfError" id="bfEmailError"></div>'; } else { myreturn = ''; } } );
            if(myreturn != '') { JQuery(element).after(myreturn); } else { JQuery('#bfEmailError').remove(); }
            break;
        default:;
    } // switch
} // ff_email_action


Sorry to bother you

Regards

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Check duplicate value on Table by drop-down 1 año 4 meses antes #273629

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderador
  • Moderador
  • Registered
  • Mensajes: 12079
  • Gracias recibidas: 788
Hi,

could you please test?

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Check duplicate value on Table by drop-down 1 año 4 meses antes #273631

  • Autor del tema
  • midimoinsdix
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 100
  • Gracias recibidas: 0
Yes message appear on a new blank page when there are dupplicate.
But we are not return on the form page with message, as with your previous intervention ...
:unsure:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Check duplicate value on Table by drop-down 1 año 4 meses antes #273632

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderador
  • Moderador
  • Registered
  • Mensajes: 12079
  • Gracias recibidas: 788
Hi,

ok, I need to find what I need to change in validation code for select list, and then everything will be fine

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Check duplicate value on Table by drop-down 1 año 4 meses antes #273633

  • Autor del tema
  • midimoinsdix
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 100
  • Gracias recibidas: 0
This is exactly where I'm stuck :unsure:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Check duplicate value on Table by drop-down 1 año 4 meses antes #273634

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderador
  • Moderador
  • Registered
  • Mensajes: 12079
  • Gracias recibidas: 788
Hi,

and now, please check?

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Tiempo de carga de la página: 0.063 segundos

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!