Auto populate with username based on userrole

Hey friends,

Probably an easy one this, but so far the solution eludes my n00bness.

I have a form whereby I need a field to auto-populate with the user’s name if the user role is equal to that of an Approval Officer. Basically, the general idea is the officer goes in to tick a box and the field populates with their name as the approving officer.

Thanks for reading,

Steve