Two Shopify 'Forms' ( {% Form 'Customer' %} )

Hello everyone,

I’ve used a liquid form twice on a page at certain points. Once in a popup then another in a separate section. Because they are just “forms”, when one is successful, by default, so is the other. Is there any way I could work around this so they can both have seperate success methods?

Just as an example, the pop-up success should be a second screen confirming the pop-up. The footer sign-up needs to simply just have text appear and the input hidden however if I sign up in both, either success method works together.

I appreciate any help.

Thank you and have a good day.

Hi @abdullah_shah31 ,

You can declare id and add condition at function ‘form.posted_successfully?’ for differentiating forms, it will work fine. Example:

Code:

{%- assign formID = 'ContactFooter' -%}
{%- if form.posted_successfully? and formID == 'ContactFooter' -%}

{%- endif -%}

Hope it helps!

I am having the same issue as OP but this solution does not seem to work. I have changed up everything that I can think of as far as form ids and such, to no avail. Would love a concrete answer on how we can have two customer forms on a single page without the errors/success propagating across both forms.