Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Add more than 1 form on a page? View modes: 
User avatar
Member
Member
gatsby0121 - 9/22/2011 4:33:13 AM
   
Add more than 1 form on a page?
Is there anyway to have more than one form on a page? I have some google search code that I need to embed in the master page, in the cms. I'm trying to do it in a static text webpart without encode controls enabled, and it's removing the form.

I also tried it in the page layout, but it still strips the form tags.

Is this possible?

5.5 R2

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/22/2011 5:53:25 AM
   
RE:Add more than 1 form on a page?
Hi,

Kentico CMS does not allow you to use several form tags on one page (only one is allowed). There is already one form tag used on the page therefore inserting another form tag into page, you creates following code:

<form runat="server"> //kentico
<form method=""post>//your
</form> //your
</form> //kentico


As you can see this in not what you would like to achieve.

If you would like to post data from your form control you can use one of following ways:
1. use iframe and insert the whole page with the code into it
2. use webclient class to post data instead of form control. You can find an example here: www.netomatix.com/httppostdata.aspx


Best regards,
Ivana Tomanickova

User avatar
Member
Member
gatsby0121 - 9/22/2011 8:03:52 AM
   
RE:Add more than 1 form on a page?
Thanks as always for pointing me in the right direction.

While that site wasn't quite what I was looking for, as it only allowed you to post to another site, not post and send the user there.

However, it got me thinking and I stumbled on this post:

http://stackoverflow.com/questions/5179/how-do-i-post-and-then-redirect-to-an-external-url-from-asp-net

and that finally did the trick!

Thanks again for you help,

Wade