Kentico Page Form

Jacob Mallach asked on August 26, 2019 21:11

Hello,

I'm running into an issue with the way Kentico wraps the entirety of a page in a form tag. We have a third party widget that we'd like to add to our site, except that also uses a form tag, which in turn breaks our global search tool. How does one go about solving the nested form issue with Kentico. My guess is I'm not the first feller to run into conflicts with this?

Here is my test page.

https://authoring.carrollu.edu/world-cat

Appreciate the feedback.

Recent Answers


vasu yerramsetti answered on August 26, 2019 22:10 (last edited on August 26, 2019 22:15)

Try with closing form tag (</form>) before start your 3rd party search widget and open form tag after 3rd party widget <form> tag.

</form>
3rd party widget
<form>
1 votesVote for this answer Mark as a Correct answer

Jacob Mallach answered on August 26, 2019 22:43

@vasu yerramsetti - No luck with that.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on August 27, 2019 09:26

This is more .Net issue rather than Kentico. .Net in ASP WebForms does not allow nested FORM tags and there is already main Form tag in the master page. You may need to use iFrame and load the third party widgets code inside the iFrame.

1 votesVote for this answer Mark as a Correct answer

Jacob Mallach answered on August 27, 2019 15:21

@Juraj Ondrus - Thanks for the feedback. I'm not a big fan of iframes, being that they're not responsive. However, that is a good suggestion in the event we have no other options avail.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 27, 2019 18:20

There are 2 other options aside from the iframe (which is typically our go to method).

  • Javascript to take an HTML element and place it after the closing form tag. Then use a modal or css to place the form in the proper location.
  • very last resort of nothing else works, modifying the /CMSPages/PortalTemplate.aspx page. Keep in mind modifying this page is not recommended and will affect ALL other pages on your site.
1 votesVote for this answer Mark as a Correct answer

Michael D answered on November 22, 2019 17:46

Hi Brenden Kehren,

How do you move the element? Is there a place I can see the Javascript code to take an HTML element and place it after the closing form tag?

Thanks

0 votesVote for this answer Mark as a Correct answer

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