Using flappe cloud: Doctype field to assign a user role

I’ve created a doctype to enroll some users into a special group. I also created a role/ permissions for the special group/ webpage. The problem is how to setup a field on the doctype or webform to auto assign the role to the user once they complete the document.

Thank you!