79368974

Date: 2025-01-19 12:55:03
Score: 1
Natty:
Report link

Hopefully to save others looking around I found a working solution which avoids using the bt-tooltip-errors plugin.

In your .js file enable the bootstrap tool tip as normal;

const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))

Then wherever you have your function that submits the query when you click the button;

$('#btn-get-sql').on('click', function() { ... }) Add the following;

var elem = $('div.error-container');
elem.attr('data-bs-original-title', elem.attr('title')).tooltip();

Now when you have a querybuilder error the tooltip will show up in the correct style. If there is a better way to do this please let me know.

Reasons:
  • RegEx Blacklisted phrase (2.5): please let me know
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: user3788685