Page

Page class can be used to combine multiple widgets into a single page. A dictionary is returned with entries containing values from input widgets. These entries are labelled with the widget message if no key is provided.

Basic Example

Basic use of Page class

Name

Email

Using keys

Using the key param to label the returning dict

What is your name?

What is your email?

Multiple actions

Using the actions param to show multiple buttons at the end of the page

Contact's name

Contact's email

Reactive Pages

You can create pages with dinamic content using the reactive widget. You simply create a function that receives a partial result from the page and returns a new Page, with the widgets you wish to be rendered, which can be both inputs and outputs.

What's your name?

What's your age?

You are eligible for the senior discount

Page validation

You can pass a validate function to the run method in your page in order to validate it. This function receives a partial result and can return either a boolean (True for valid and False for invalid) or a string with an error message to show the user.

Email

You must be an Abstra member to use this form