Sorry for the confusing title :)

I don't know why field key is an editable field for existing form fields.
Changing this value can break things and it is not great to have to tell clients "Oh and that field key. Never change that.".
Their obvious and rightful response would be why is it there if I'm not supposed to change it.
It just doesn't work saying things like that to clients and it is unprofessional to do so IMO.

I think that the field should be disabled except for when adding a new form field, but that might be a bit much for some people so how about an option to disable or hide it?
Or how about an extra permission to be allowed to change that value? That would probably be more useful.

Comments

danchadwick’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

WAY too late to make the form_key into a machine_key.

rooby’s picture

Status: Closed (won't fix) » Active

The request is not actually to change the form_key field in any way, it is to have some sort of permission so that you can restrict certain users from editing them.

So the field remains but for some users it is hidden or disabled.

I don't think it is too late for such a change and I think it is a useful change because admins that have access to edit the form can break things by changing that value after the field has been initially created.

danchadwick’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev
Status: Active » Closed (won't fix)

There is nothing in the current webform that causes a problem if formkeys are changed. If you would like to prevent them because of some problem that it might cause your particular site, use hook_form_webform_client_form_alter() to disable the field. I don't see this being added to the 7.x branch.

That said, I would have preferred that components be referred to be unchangeable machine keys, but that's a different issue (and there is an issue for that somewhere).