Skip Navigation

[Resolved] Extra p and br tags in a post form within a view loop

This support ticket is created 4 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by timE 4 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1296241

I am trying to:
I have a page that has a view showing a loop of posts from my "Course" post type.
For each item in the loop it calls a post form to update certain fields from the course.
The form is outputting additional <p> tags and <br> tags

Link to a page where the issue can be seen:
hidden link
You will need to login to see this page.

I expected to see:

<label>Title Override</label>
<div ....>
<input ....>
</div>
<label>beforetitletext</label>
<div ...>
<input ...>
</div>

Instead, I got:

<label>Title Override</label><p></p>
<div ....>
<input ....>
</div>
<p><label>beforetitletext</label></p>
<div ...>
<input ...>
</div>

In some places it adds extra <p> and in some it adds extra <br>

Not also that it's an AJAX form. After I submit a form, that particular item in the loop displays correctly without any extra <p> or <br> tags.

My view doesn't use a content template. I tried adding one and making sure it the Output mode set to "Manaul paragraphs" but that made no difference.

Any help much appreciated.

#1296263
#1296411

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Tim,

Could you wrap your items in this shortcode below and see if it removes the auto paragraphs?

https://toolset.com/documentation/user-guides/views-shortcodes/#vf-310704

Thanks,
Shane

#1297683

Thanks Shane,

Unfortunately this doesn't fix it.

I've tried putting it in the view, outside the [cred_form form='xxx'] code.
I've tried putting it in the form, around all of the form content.
I've tried putting it in the form around a single line of the form.

Is the [wpv-noautop] shortcode supposed to work in Forms as well as Views?

#1297787

My issue is resolved now. I'm still not sure why t was a problem, but I just recreated the view and the problem wasn't there with the new version of the view, even though all of the settings are the same.

Thanks for you help.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.