Minorenne
Prenotazione
Compila il modulo per richiedere la prenotazione.
Inserisci i dati di seguito
// Validate confirmation email
add_action( 'elementor_pro/forms/validation', function ( $record, $ajax_handler ) {
$form_name = $record->get_form_settings( 'Minorenni' );
// Replace MY_FORM_NAME with the name you gave your form
if ( 'Minorenni' !== $form_name ) {
return;
}
//Replace MY_FIELD_ID_1 to match the field's Advanced > Field ID
$first_email_field = $record->get_field( [
'id' => 'email'
] );
//Replace MY_FIELD_ID_2 to match the field's Advanced > Field ID
$second_email_field = $record->get_field( [
'id' => 'field_3950bdf'
] );
//Make sure your field ID's are set to match these in each field's Advanced > Field ID
if ( $first_email_field['email']['value'] !== $second_email_field['field_3950bdf']['value'] ) {
$ajax_handler->add_error( $second_email_field['field_3950bdf']['id'], 'Confirmation Email must match the Email field' );
}
}, 10, 2 );