copy-paste-tweaked from the groups ui. is this enough code to warrant a shared template and if so where does that go? (my opinion is that it's not enough/worth it as you have to introduce other dependencies like the id of the submit button... though am open to being talked into it)