Using Moodle forms, in order to add a save/cancel pair of buttons we have to call this function:
I have found when multiple Moodle forms exist in the same page, no matter where they are (main content, block etc) the same HTML id is utilised id_commitbutton which then is a violation of the uniqueness in the same page and the mentioned id is hard coded in many places in Moodle code BehaT tests, which I suspect tests in pages with two forms will fail or choose the wrong form to submit.
As this is a core design with many aspects in functionality of the forms, the behavioural tests or third party development distinct logic, I would like an input from the community, such as being able to add a custom pair of IDs for Save/Cancel, or a class to define and utilise in BehaT features instead of this multiple used ID.
Also the labels for these two buttons are empty and this is another accessibility issue, we either have to remove the labels or utilise them in a valid way.
Here is an example: