Forum Replies Created

Viewing 1 replies (of 1 total)
  • cpwebsite,

    I found the solution!

    file: contact-form-7-city-field-extension.php
    line: 163

    Problem is in validation.
    Correct is:

    function wpcf7_cityfieldtext_validation_filter( $result, $tag ) {
    
    	$wpcf7_contact_form = WPCF7_ContactForm::get_current();
    
    	$type = $tag['type'];
    	$name = $tag['name'];
    	$value = isset( $_POST[$name] )
    		? trim( wp_unslash( strtr( (string) $_POST[$name], "\n", " " ) ) )
    		: '';
    
    	if ( 'cityfieldtext*' == $type ) {
    		if ( '' == $value ) {
    			$result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
    		}
    	}
    
    	return $result;
    }

Viewing 1 replies (of 1 total)