I spent some time working through the javascript, and it's a rather nasty labyrinth. First, all multi-values are written by JS (see the field_manager.es6 file in Hydra::Editor). My hope was to be able to discard the "X Remove" button from the HTML of the first element. However, that proved difficult as there's an assumption that that HTML will be around when we click the "Add another Title" link.
It would be possible to "store that" somewhere, but that felt like some complicated changes. Instead I went down the path of CSS and settled on the above. It's not quite perfect but it does things a little better. Yes, you could disable stylesheets and thus see the button again. Yes you could inspect element and do nefarious things. But at the root, this solution preserves the "required" input field AND helps avoid POSTing the form.
With the following CSS
I get the
I spent some time working through the javascript, and it's a rather nasty labyrinth. First, all multi-values are written by JS (see the field_manager.es6 file in Hydra::Editor). My hope was to be able to discard the "X Remove" button from the HTML of the first element. However, that proved difficult as there's an assumption that that HTML will be around when we click the "Add another Title" link.
It would be possible to "store that" somewhere, but that felt like some complicated changes. Instead I went down the path of CSS and settled on the above. It's not quite perfect but it does things a little better. Yes, you could disable stylesheets and thus see the button again. Yes you could inspect element and do nefarious things. But at the root, this solution preserves the "required" input field AND helps avoid POSTing the form.
Related to samvera/hyrax#3526