Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Multiple XForms on same page


Is it possible to have more than one xform on a page?

Tried adding a second but the submit button on the second form caused submittion of the first form.
If it is possible to use two xforms on same page, how do you do it?

Jan 21, 2011 12:48

You could add a asp:button control and handle the onclick event. Save the data to the correct x-form.... Not a nice way to do it, but it should work 

Jan 27, 2011 10:51

2 forms could also work...

Jan 27, 2011 12:25

But I have the form-tag on the masterpage

Jan 28, 2011 7:58

Try refactoring your design using a nested masterpage to hold the XForms control.  Additionally - has anyone actually produced Page Templates that contain more than a single XForm instance?  How did you handle this issue with your design (assuming you did)? 

Mar 14, 2011 18:43

No we never solved this issue, we informed the client of it and they are aware that they should only use one form per page.

Nestling could solve it but that also depends on how the page-layout is set up.

Yes, would be very interesting to hear about someone how has had more than one Xform on a singel page.

Edited, Mar 15, 2011 8:05


It shouldn't be a problem hosting multiple XForms on a page. Just make sure that you have different validation groups for the different forms. There is currently a bug in the global xforms events in the CMS 6 public templates that always sets the validation group to the same value but that's easily fixed since it's in the templates.

Linus Ekström
EPiServer Development Team

Mar 15, 2011 20:13
* 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.