Forum Discussion
_anomDiebolt_
9 years agoQrew Elite
FWIW, there are a couple of other things you can do:
(1) Simply noop QuickBase's ConfirmLinkAway function by redefining it with no body:
I didn't test this code but it should work. See this example of a Mutation Observer that focused on the Save button when a certain Form Rule Dialog Box appeared:
Form Rule Message Box - Dismiss With Enter Rather Than Click
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=274
(1) Simply noop QuickBase's ConfirmLinkAway function by redefining it with no body:
function ConfirmLinkAway(){}(2) Define a Mutation Observer so that when the dialog appears your code immediately clicks on the Save button.
$(function(){
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.type == "childList" && mutation.target.getAttribute("id") == "dialogLinkAway") {
$("#dialogLinkAway button:contains(Save)").click();
}
});
});
var body = document.body;
var config = {
childList: true,
subtree: true
};
observer.observe(body, config);
});
I didn't test this code but it should work. See this example of a Mutation Observer that focused on the Save button when a certain Form Rule Dialog Box appeared:
Form Rule Message Box - Dismiss With Enter Rather Than Click
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=274