Can you import a form directly using ID or name in Dawn template?

Arminda
Visitor
2 0 0

Hello, I'm using the Dawn template and the Forms addon from Shopify. I'd like to inquire whether it's possible to import or include a form directly using its ID or name?

Somthing like this 

04.10.2023_12.49.20_REC.png


Thank you

Replies 5 (5)

syedsumaimaly
Trailblazer
147 16 21

Hi @Arminda 

  1. You can do this by going to Online Store > Themes > Actions next to the theme you want to edit > Customize. Then, click Forms and select the form you want to import or include. The ID or name of the form will be displayed in the Form ID or Form Name field.
  2. In the Dawn template, go to the page or section where you want to import or include the form.
  3. Add the following code to the page or section:

 

{% include 'forms/form.liquid' with form_id: 'YOUR_FORM_ID' %}

 

 If I managed to help you then, don't forget to Like it and Mark it as Solutions.

Arminda
Visitor
2 0 0

Thanks in advance for the quick reply. However, I'm encountering an error, and I'm unsure whether it's something I'm doing wrong or what might be causing it.

04.10.2023_14.26.29_REC.png

 

aprya
Visitor
1 0 0

Hi Amanda, Did you manage to correct this as I am having the same issue. 

HarshilK
Visitor
2 0 0

Hi Aprya did you find any solutions? for 

prettypetty
Shopify Partner
11 0 1

Include is deprecated, try render.

Shopify partner since 2017
Liquid lover