Forms Widget Breaking Div from Section

Francis Carroll asked on May 9, 2022 11:43

Hi,

I am running ASP .NET CORE application with Kentico 13.0.43 on a IIS 10 Server.

I am having an issue with the form widget. Everytime i add the form widget it breaks the section div that it is in and adds all other div below it into its own container.

For Example the code should look like this

<div>
    Form
</div>
<div>
    Widget 1
</div>
<div>
    Widget 2
</div>

But the code looks like this as soon as any form is selected

<div>
    Form
    <div>
        Widget 1
    </div>
    <div>
        Widget 2
    </div>
</div>

I dont know why this is happening as it doesnt happen with any other widget aside from the form. Any insight into this would be apprieciated.

TIA, Francis

Correct Answer

Francis Carroll answered on July 25, 2022 13:48

I was missing closing div tags

rookie mistake :)

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on May 9, 2022 17:07

The issue is most likely with your partial view for your sections and form control widgets. Validate your HTML is correct in those views and you should be set.

0 votesVote for this answer Mark as a Correct answer

Francis Carroll answered on May 13, 2022 11:28

Hi,

So i checked my partial views for my sections and this doesnt seem to be the issue. I also tried using the default Kentico section and it still causes the same issue.

I dont have a custom partial for the form as i am using the default kentico form widget.

I plan to hotfix the project to a more recent hotfix in the coming weeks to see if it will resolve the issue but in the meantime is there any other recommendations for this issue.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 25, 2022 14:05

The out of the box form controls and form sections are correct. You cannot inspect the output html to validate, you need to view the raw output html to verify it. I'm willing to bet it's something other than your form, maybe look at the fill control where you're placing for form widget. Maybe it's inside a P tag or something.

0 votesVote for this answer Mark as a Correct answer

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