Embedded form with action on another site

Don Rea asked on February 14, 2022 16:05

We have a Kentico 11-managed site. One of our departments would like to embed a form into the content of one of the pages with an action that is part of a different site (a subscription form for our mailing list management partner). When trying to submit changes to the page that include the embedded form, the content editing applet removes the <form> tags. I am new enough to Kentico that I do not know why it does that, I don't know if there's an "official" way to do what we're trying to do, and I don't know if there might be a good way to work around this if there isn't, and I have failed to find anything relevant in the doc. I'd be very grateful for any help or pointers to documentation that I've missed.

Correct Answer

Juraj Ondrus answered on February 15, 2022 06:31

This is more of a .NET thing - you cannot have nested < form> elements in ASP.NET. And there is usually already a FORM on the master page. In this case, you need to use iFrame and add the embedded form into an iFrame. Make sure you will ensure the clickjacking protection and set the headers right in the source site. If the Kentico page is to be embedded, it is done like described here.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.