Skip to content

Overview

To allow for manual interaction within the task of a state, you can return frontend form elements, which the assignee of a task then has to process.

Frontend form elements can also be used to add new user-specific settings. Learn more about user settings here.

To create a form, use the perseus.frontend_form.FrontendForm class. You can add items to the form using the FrontendForm().add_items() method, which takes all items passed to it and appends them to the form. Check out the available form items here.

In this example, we append some text to the form:

from perseus.frontend_form import FrontendForm, TextBlock
form = FrontendForm()
text_block = TextBlock("this is some *random* text")
form.add_items(text_block)