Skip Navigation

[Resolved] Multiple .form-group divs

This thread is resolved. Here is a description of the problem and solution.

Problem:

I'm creating a custom search, On the Edit View screen, Search and Pagination section, each time I add a new filter / form control, the editor wraps it with a

. Is this how it's supposed to work?
is there a way to prevent the editor from adding them every time?

Solution:

This is expected result, but you can remove those form-group divs manually.

Relevant Documentation:

This support ticket is created 6 years, 2 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by ScottH7099 6 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1147686

Tell us what you are trying to do? I'm creating a custom search.

Is there any documentation that you are following? I've been through some docs, but not just one specific page.

Is there a similar example that we can see? Not in the front end, no.

What is the link to your site?

On the Edit View screen, Search and Pagination section, each time I add a new filter / form control, the editor wraps it with a <div class="form-group"></div>. Is this how it's supposed to work??? I seems to me that only one of those would be necessary to wrap all the form controls. Or do these divs serve some other purpose that I'm not aware of? If not, is there a way to prevent the editor from adding them every time?

Thanks!

Scott

#1147757

Dear Scott,

You can follow our document to setup the custom search form:
https://toolset.com/documentation/user-guides/front-page-filters/

For the HTML tag <div class="form-group"></div>, that is expected result, with it you can style your custom search form with custom CSS codes, for example:

div.form-group{
/* Your CSS codes here*/
}

But if you don't need this HTML tag, you can remove them, it will not take effect on the search result.

#1148563

Hi Luo:

Thanks for the reply. Yes, I know how to use them in CSS. However more often than not, I'll probably use bootstrap elements to lay out the form, which usually makes those .form-group divs redundant.

So is there a way to prevent Toolset from adding those divs around each and every form control???

Thanks!

#1148950

No, there isn't such a built-in feature, but you can remove those form-group divs manually.

#1149414

I was hoping to avoid having to manually remove them all, but for now I guess that's the only solution.

Thanks for the follow up.