How to disable read-only based on People picker field

Hi there,

I have a form with a number of fields. I only want the Hiring Manager to be able to edit the fields, but others who have access in the same group to have read only. If i default all fields to read only (true), is there any code I can apply to allow the person editing the form, if their email matches the "Hiring Manager" person picker field, to be able to edit fields.

Also, is there a way to hide a button if the person editing is NOT the person in the "Hiring Manager" people picker field.

Thank you for your help.

Hello @mhannaway,

The easiest would be to create a new form set that allows editing and rout user who is Hiring Manager to this form.

On the default form you can make all fields read-only and remove any buttons.

1 Like

Thanks @mnikitina that makes total sense, and I realised this when I raised another post. Hopefully it can get addressed. I'll link it here.

1 Like