Oh i got your point i.e. calling __init__
function within another function. That’s a good suggestion.
I tried the following code as you mentioned:
get_open_form().__init__()
and it worked but lead me to home component. I want to stay on the same component which i named t_component
. So i tried the following code:
get_open_form().t_component.__init__()
and got this error:
AttributeError: 'home' object has no attribute 't_component' at [t_component, line 129](javascript:void(0))
I tried to follow this post: Calling a function from within a Template form
But the component names are confusing me. I tried a couple of things but got errors.
You can have a look:
https://anvil.works/build#clone:PWGKX63L7AD4OZVF=EMDLVKG3YBCB7ZW4NNEWX7ZF
whenever i click this TRAIN NEW MODEL button, i want to stay on the same page but all the textboxes should clear up.