Updating a task
2 of a 4-part CRUD use case series. In this article, you'll learn how to update a task in your application.
Note: For this example, a Task overview page has already been set up with a data table containing all existing tasks.
Creating Task detail page
To get started, create a new page. For this example, use the page template named Basic header and footer.
Let’s call the page Task details and change the URL to tasks/:task_id. The part in the URL: task_id refers to the ID of a task. It's a variable that we can use to show the details of a specific task. We can keep the page public – only for testing purposes!
Press Create page follow by Add without configuration to create the page, unless you have your own header and footer available. In that case, use those and hit Save.

Building the page
Now that the page is created, we can add the functionality to update tasks.
Go to the Form section and drag an Update Form onto the page.
-
Press
Select model, choose the Task model, and select the data model properties and fields you want to include in this form. Then clickSave.
Learn more about Forms and their use in Create, Update & Login - Form components

Once you configure the Update Form, Betty Blocks automatically creates an input variable task_id and applies a filter — set to show only the task where Task.Id equals task_id. This links to the task_id in your page URL (tasks/:task_id), which holds the ID of the task you're navigating to, so the form always loads the right task.

Note: If you see the error "Token is expired, please re-login" or "Unauthorized for model(s): Task", check that you've set the right permissions to read or update your model data. See the What are model permissions article for more details.
Adding navigation
1. On the Task overview page, select the Data Table and scroll to the Row click option. This lets you redirect a user to the Task detail page whenever they click on a task in the table.
2. Click Select a page, choose the Task detail page.
3. You’ll then see an option for an input variable — choose task_id variable so the Task.Id from the overview is passed to the detail page, and click Select.

4. Press Play button in the top left of the screen and test it out.
When you click on one of the Tasks in the overview, it will redirect you to the detail page, where we can change the status or the name of the task
.gif?width=670&height=299&name=Screen-Recording-2026-04-14-at-1%20(2).gif)
→Next article: Deleting a task