How to set Anonymous User Role through UI

HI, How can set different role (Customer, Admin, SuperAdmin) of user during registration .  I know that we can get through like below . But i want to set through UI. Means when we submit the request then user can  select Role.
1 answers
  • Retrieve all system roles and show it to the user in a reference selector from the selectable items. 


  • when the user submits the registration, create a new ‘administration.account’ object and set the selected role (‘system.UserRole’) as the role of the new account object.