Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
Querybuilder.js - How can I limit the conditions to have "AND" in the root, and "OR" in the subgroups?

I am used to working in C#, and just got handed this project with querybuilder. I have been searching for hours and can't seem to figure out how to achieve this.

What I want is for the root condition to be "AND" - which is default.

But since it is default - when I click "Add group" and then "Add rule" in that group, the "And"-condition is selected by default. But I want the "or" to be selected between rules in all groups.

I added a photo which you can reach with below link.

Does anyone have an idea? It would be highly appreciated.

Limit conditions in querybuilder subgroups

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ok, I would then do something like this with jQuery:

$('#btn-add-rule').on('click', function() {
    $("#btn-parameter-or").trigger("click");
});

It can be a bit rough if the buttons don't have unique ids or classes, then you have to select by nth-child() selector

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!