WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack Contact From not Sending when in do_shortcode (3 posts)

  1. indigobiker
    Member
    Posted 1 year ago #

    I have a contact form on my website in the do_shortcode atribute

    <?php echo do_shortcode('[contact-form subject="subject" to="info@domain.com"] [contact-field label="Name" type="name" required="true" /] [contact-field label="Tel No." type="text" /] [contact-field label="Email" type="text" required="true" /] [contact-field label="Enquiry" type="textarea" required="true" /] [/contact-form]'); ?>

    When on the page I fill out the form and click send and it reloads the page and adds the form ID to the url as an anchor but it doesn't send the form. I do not get anything in feedbacks and i do not get an email.

    I installed email log but nothing appears in it and i get no errors. Can someone shed a light on it?

  2. wWave
    Member
    Posted 1 year ago #

    Hi indigobiker,

    Did you find a solution? I have the same issue.

    Here is where it stops.

    $form = Grunion_Contact_Form::$last;
    if ( !$form || ( is_wp_error( $form->errors ) && $form->errors->get_error_codes() ) ) {
    			return;
    }
    
    // Process the form
    $form->process_submission();

    It does all the rest before, like validation of field, but it fails here where $form is returning nothing. So is never submitted.

  3. Comrade
    Member
    Posted 1 year ago #

    I am having the same problem. If I use the shortcode in a page's content via the UI, it works. But if I use do_shortcode(), nothing happens. Extremely frustrating!

Topic Closed

This topic has been closed to new replies.

About this Topic