Contact Form - Adding fields and an unknown error

I added a contact form to the Spirit theme. The form is the one in Upfront.

1) How do I add more fileds?
2) I get this error: There was an error sending the email.
There is no indication as to what the error is.
3) Is there a different way to add a contact form?

  • Panos

    Hi Arlene ,

    The Contact element of UF contains the fields that are usually required in contact forms plus a Captcha field.

    The Contact element uses WordPress' native wp_mail() function. Could you do a quick test and enable error logging and add in your functions.php the following:

    add_action( 'wp_mail_failed', function( $wp_error_obj ){
    
    	error_log('wp_error_obj: ' . print_r( $wp_error_obj->errors, true ) );
    
    }, 10);

    Then try sending an email and check the wp-content/debug.log file for the error it prints.

    You can use any contact form plugin (eg contact form 7) as long as it provides a shortcode. You can simply insert the shortcode in a text element in the page you need.

    Hope this helps