# widget_autoassign widget_autoassign
When you access a task from a direct link, BonitaPortal displays the form and you can work with him. But when you want to submit the form, you got a "you are not assigned to the task". This is particularly annoying if you want to send the task list by email.
So, put this widget in the form, and branch the taskId and the UserId. The widget will do the job for you.
Tips: in a form,
- taskId is available directly by taskId
- userId is available by:
- Create a REST API variable user => ../API/system/session/1
- then branch the userId to user.user_id