If you set your input type for that text box to number (in the properties panel for the text box), then it’ll come through as an int rather than a str.
By way of introduction, for the last three years, I have been teaching Secondary Computer Science in London- this is after many roles in Technology.
I am getting up to speed on Anvil this month to introduce it to my A-level students for their computing projects. Currently, they are using the Tkinter and SQLite3 libraries in Python, but I think they should be far more productive on Anvil.
I flagged this glitch because I got an error running the Tutorial solution. Is this forum the best place to flag issues? If not, where should I provide feedback?
This is the right spot to flag those sorts of things. The tutorial should have talked about setting the input type for the year field text box. That switch from the text box giving back a number vs a string isn’t obvious, but is important especially to get the right keyboard on mobile devices.
I’ve had good luck using Anvil with students, hopefully yours have the same great experience.