Contact Form not displaying success message - Horizon Dwell

Hi all,

I’m not having luck getting Shopify to display the contact form success message. The built in basic form worked on my Dawn theme but now with Horizon Dwell I have two issues.

  1. Emails work, but the form doesn’t display any success message (though once submitted, the browser URL changes to success.. and oddly with the contact form ID # in the URL).
  2. In the contact form email, I get the customer country and then the long contact form ID code again before their message. Not sure if these issues are linked.

I’ve tried a number of things without luck. Any ideas?

site: bookishcat.co
p: 6N$7fyxV689k!

1 Like

Are you using smile.io app? Please try deactivating that app and then check again.

Best regards,
Dan from Ryviu: Product Reviews App

Hi Dan, thanks for your response. I have the smile.io app but I never activated or set it up.

Did you add custom contact form?

Sounds like there’s a hang up in the code, or something is misconfigured. You could try looking for an error message. Right click the contact form, click “Inspect”, then click “Console”. Submit the email form again, and watch the console to see if there are any messages

No, this is the basic contact form that comes with the Horizon theme.

Thanks. I am getting one, I am not sure what to do next. This is just the form built in to the Horizon theme so there is not much to configure. I have setup the message and removed the phone number input box with a line in base.css

Hey,

The issue you described are theme code level fixes. You need to upload your theme with github and then share the link with me. So that, I can make changes in it.

Also, you were talking about the url change. Which is very common in that case. Means when the form submit then showing the success message showing is common. And this happens on all Shopify store. Unfortunately Shopify horizon theme don’t have the built in way to show the success message.

In that case, we need to do code so that the success message should show properly.

I’d guess there is a plugin interfering with the default behavior. Dan mentioned smile.io, but it may be another one. Do you have others installed? I’d try temporarily disabling them one by one and testing submissions

Thanks. Still no luck. I did remove smile, it wasn’t active. I now removed these apps that were not in use (locksmith, wishify, mailerlite, instafeed). I am left with the basic shopify apps (search & discovery, messaging, flow, translate & adapt) and clickship, nova currency converter, judge.me, and ‘section store’ blocks on two pages (about and sustainability). I’d consider it a last resort to uninstall those and lose data, CSS customizations.

I just went back to my check if this was a Horizon 3.3 update issue. Sure enough the contact form works on the previous release version. So something I changed between that time or is there an issue with the latest Shopify update?

Is the URL after a form is submitted a hint at what is going on? And it is oddly submitted on the email end too…

Took a look at the code - the core of the issue is that form.id is null after a successful contact submission. The code needs form.id=form_id in order to display the success message, which always fails if it’s null. Why is it null? ChatGPT says “In Shopify Liquid, form.id is not consistently populated across form types/themes. Relying on it for contact-form postback logic is brittle.”. To implement a true fix, I think a member of the Shopify dev team would have to take a look.

For your case, you can fix it by editing the code, if you’re comfortable with that. The file you need is blocks > contact-form.liquid. Delete ‘and form.id == form_id’ and save, and you should be good to go. It should be Line 41 if there isn’t any custom code added.

Thank you. I did see that line of the code myself, but was hesitant to edit liquid. I deleted it and now it does show the “thanks for your message” line. Just the email that still shows the unnecessary code ID.

Do you know how to reach out to the Shopify dev team? If this is an issue from a recent Horizon theme update, I’d love a permanent fix so I don’t have to fix liquid code each update (have already had 2 version updates in the last week).

You could try reaching out to their email: shopify-app-support@shopify.com. A permanent fix will involve the theme developer making a patch.

Another option that would survive updates is to create a new, custom contact form block with your code change, and replace the current one with the custom one.