SaaS CMS has officially launched! Learn more now.

EpiServer Forms


Just wondering if it is possible to call an episerver form directly through code? I've added an additional property to the product where it accepts an Episerver form but was thinking that it would be tedious to repeatedly drag and drop the form into each product (will be adding the form into all products). Can someone guide me to how to call a certain form/block (was also thinking that Form Container is a block)

Edited, Jul 27, 2021 4:00

Content, Products and most things are just IContent items, therefore you can use the IContentRepository to programtically create/edit them such as adding a form reference to a page/product.

Here's some examples of working with it 

But there's plenty of articles / blogs out there but they are all pretty much the same use

Jul 27, 2021 8:26

Hi Scott! Yeah, that worked! Was actually using a wrong approach that's why it keeps giving me null. Thank you!

Jul 28, 2021 7:25
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.