I am trying to add previous/next buttons on the add and edit form of a dexterity item with several fieldsets. I am using the default tabbed layout for the fieldsets. I have learned that the tabs are rendered by MockUp/JQuery. And because of this I am failing to capture the anchor elements with:
document.addEventListener('DOMContentLoaded', function() {
const elements = document.querySelectorAll('.autotoc-nav a');
console.log(elements);
});
The above returns an empty node.
I have tried the JQuery equivalent of the above but the results are the same. I have also tried moving the script to the footer slot but it did not matter. The selector works on the browser console since the page is fully loaded.
I am using ClassicUI on Plone 6.0.14.