• Resolved bentomsett

    (@bentomsett)


    Hi, I’ve just set up a HappyForms contact form on my website, but when the form is submitted, I see a JSON string on the page rather than a rendered page. On success, this is the text I get:
    {"success":true,"data":{"html":"\n<div class=\"happyforms-form\" id=\"happyforms-34\">\n\t<form action=\"\" class=\"\" id=\"happyforms-form-34\" method=\"post\">\n\t\t\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"happyforms_message\">\n\t\t\t\t<input type=\"hidden\" name=\"happyforms_form_id\" value=\"34\" \/>\n\t\t\t<input type=\"hidden\" id=\"happyforms_message_nonce\" name=\"happyforms_message_nonce\" value=\"14dface0d3\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/contact\/\" \/>\t\t\t<input type=\"hidden\" name=\"happyforms_step\" value=\"0\" \/>\n\t\n\t\t\t\t<h3 class=\"happyforms-form__title\"><\/h3>\t\t\n\t\t\t\t<div class=\"happyforms-message-notices\">\n\t\t\t\t\t\t<div class=\"happyforms-message-notice success\">\n\t\t\t\t<h2><p>Your message has been sent. I'll be in touch soon!<\/p><span>Tracking number: 3<\/span><\/h2>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\n\t\t<div class=\"happyforms-flex\">\n\t\t\t\t<input type=\"checkbox\" name=\"34single_line_text_-1\" value=\"1\" style=\"display: none;\" tabindex=\"-1\" autocomplete=\"off\">\n\t\t\t\t<div class=\"happyforms-form__part happyforms-part happyforms-part--single_line_text happyforms-part--width-full happyforms-part--label-inside\" id=\"happyforms-34_single_line_text_1-part\" data-happyforms-type=\"single_line_text\" data-happyforms-required=\"\">\n\t<div class=\"happyforms-part-wrap\">\n\t\t\t\t\t\t<label for=\"happyforms-34_single_line_text_1\" class=\"happyforms-part__label\">\n\t\t<span class=\"label\">Name<\/span>\n\t\t\t<\/label>\n\t\t\t\n\t\t<div class=\"happyforms-part__el\">\n\t\t\t\n\t\t\t<input id=\"happyforms-34_single_line_text_1\" type=\"text\" name=\"34_single_line_text_1\" value=\"\" placeholder=\"\" required aria-required=\"true\" \/>\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t<span class=\"happyforms-part__description\"><\/span>\n\t\t\t\t\n\t\t\t\t\t<\/div>\n\t<\/div>\n<\/div><div class=\"happyforms-form__part happyforms-part happyforms-part--email happyforms-part--width-full happyforms-part--label-inside\" id=\"happyforms-34_email_2-part\" data-happyforms-type=\"email\" data-happyforms-required=\"\">\n\t<div class=\"happyforms-part-wrap\">\n\t\t\t\t\t\t<label for=\"happyforms-34_email_2\" class=\"happyforms-part__label\">\n\t\t<span class=\"label\">Email<\/span>\n\t\t\t<\/label>\n\t\t\t\n\t\t<div class=\"happyforms-part__el\">\n\t\t\t\n\t\t\t<input type=\"email\" id=\"happyforms-34_email_2\" name=\"34_email_2\" value=\"\" placeholder=\"\" required aria-required=\"true\" \/>\n\t\t\t\t\t\t\t\t\t<span class=\"happyforms-part__description\"><\/span>\n\t\t\t\t\n\t\t\t\t\t<\/div>\n\t<\/div>\n\t<\/div><div class=\"happyforms-form__part happyforms-part happyforms-part--single_line_text happyforms-part--width-full happyforms-part--label-inside\" id=\"happyforms-34_single_line_text_3-part\" data-happyforms-type=\"single_line_text\" data-happyforms-required=\"\">\n\t<div class=\"happyforms-part-wrap\">\n\t\t\t\t\t\t<label for=\"happyforms-34_single_line_text_3\" class=\"happyforms-part__label\">\n\t\t<span class=\"label\">Subject<\/span>\n\t\t\t<\/label>\n\t\t\t\n\t\t<div class=\"happyforms-part__el\">\n\t\t\t\n\t\t\t<input id=\"happyforms-34_single_line_text_3\" type=\"text\" name=\"34_single_line_text_3\" value=\"\" placeholder=\"\" required aria-required=\"true\" \/>\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t<span class=\"happyforms-part__description\"><\/span>\n\t\t\t\t\n\t\t\t\t\t<\/div>\n\t<\/div>\n<\/div><div class=\"happyforms-form__part happyforms-part happyforms-part--multi_line_text happyforms-part--width-full happyforms-part--label-inside\" id=\"happyforms-34_multi_line_text_4-part\" data-happyforms-type=\"multi_line_text\" data-happyforms-required=\"\">\n\t<div class=\"happyforms-part-wrap\">\n\t\t\t\t\t\t<label for=\"happyforms-34_multi_line_text_4\" class=\"happyforms-part__label\">\n\t\t<span class=\"label\">Message<\/span>\n\t\t\t<\/label>\n\t\t\t\n\t\t<div class=\"happyforms-part__el\">\n\t\t\t\n\t\t\t<textarea id=\"happyforms-34_multi_line_text_4\" name=\"34_multi_line_text_4\" rows=\"5\" placeholder=\"\" required aria-required=\"true\" ><\/textarea>\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t<span class=\"happyforms-part__description\"><\/span>\n\t\t\t\n\t\t\t\t\t<\/div>\n\t<\/div>\n<\/div>\t\t\t\t\t\t<div class=\"happyforms-form__part happyforms-part happyforms-part--submit\">\n <input type=\"submit\" class=\"happyforms-submit happyforms-button--submit\" value=\"Submit Form\" >\n<\/div>\t\t<\/div>\n\n\t\t\t<\/form>\n<\/div>\n\n"}}

    The form submits correctly, and I get the email, but I get this instead of a page.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • thethemefoundry

    (@thethemefoundry)

    Hey there, @bentomsett!

    That’s definitely weird, could you share a link to your site so we can take a look directly?

    Let us know!

    Thread Starter bentomsett

    (@bentomsett)

    Hiya, the link was tomsett.xyz/contact, but I’ve since switched to WPCF7.

    Thanks
    Ben

    thethemefoundry

    (@thethemefoundry)

    That’s a shame, @bentomsett!

    I’d bet something interfered with HappyForms, but I’d like to be sure and have a chance to fix possible issues, if that’s the case.

    Any hope you could pop it on a test page, and share with us a link? That would definitely help us investigate.

    Let us know what you think!

    Thread Starter bentomsett

    (@bentomsett)

    Sure, it’s at https://tomsett.xyz/contact-2.

    I haven’t fixed the styling issues on this one, but filling out the form and hitting submit still sends the message and shows that text.

    thethemefoundry

    (@thethemefoundry)

    Thank you, @bentomsett!

    I can’t see your form at the link you shared. In case you deactivated HappyForms could you switch it on again? It won’t impact your site performance – HappyForms loads only on pages which contain an actual form.

    Let us know your discoveries!

    Thread Starter bentomsett

    (@bentomsett)

    Ah sorry, I hadn’t actually published the page! Its at the same link.

    thethemefoundry

    (@thethemefoundry)

    I see, @bentomsett!

    Something odd is going on – I’ve noticed that your page <head> tag misses a lot of core WordPress elements, along with HappyForms’ base script (and that’s the cause of your issue). I have a hunch your theme is not calling wp_head().

    Would you double check if that’s the case? If it is, consider wp_head is somehow inevitable: most plugins and WordPress itself rely on that for their initialization.

    Let us know your discoveries!

    Thread Starter bentomsett

    (@bentomsett)

    That’s exactly it, thanks for your help! I’ll make sure its in there in future, but I’ll stick with WPCF7 for now as it’s all set up and styled. Look forward to using HappyForms soon!

    thethemefoundry

    (@thethemefoundry)

    Sounds good, @bentomsett! Let us know if you ever have more questions ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Success page not rendering’ is closed to new replies.