Wrap fields in div tag

I’m looking for a way to wrap multiple fields in a div tag.

The HTML block is automatically adding a closing </div>. So adding an open div for the value <div class="border"> renders <div class="border"></div>.

A feature request would be an HTML block option to display without a div wrapper.

The goal is to improve form appearance (e.g., borders around multiple fields) and add CSS breakpoints to improve responsiveness.

Hello. The best place to submit product feedback, suggestions, and feature requests is via the submit idea form on the roadmap page. Those submissions go directly to the product management team. Thank you.

Ugh, that feature request was a thought, and I shouldn’t have mentioned it because it took the conversation away from the actual issue. BTW - I already properly submitted that request earlier.

Back to the issue - is there a way to wrap multiple fields in a div tag?

Gravity Forms used to not correct the invalid HTML, so you could have the opening div in one HTML field, and a closing div in another, and style everything within that div, but validation was added at some point and open divs will be closed, so that hack no longer works.

The closest I know of to this is Collapsible Sections from JetSloth:

It allows you to specify whether a Gravity Forms Section field should be the Open or Close of a section. I know the collapsible part is not what you’re looking for, but their approach could be replicated with some custom code.

I don’t know of any other methods to do this without custom code.

1 Like

Thanks Chris. I’m checking it out. Appreciate your time.

There’s an article here that covers some of this:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.