How to redirect to other form by clicking a button?

As my title, could anyone give me an answer? how to redirect to other form by clicking a button? And, when I open an Url, how to display the content scraping from the web site to table? Thanks

I found it, anyway, thanks!

self.add_component(open_form(ā€˜form_Name’))

Hi there,

Just so others can benefit, I’ll give a more detailed answer to your main question.

You can set the button’s ā€œclickā€ event in the properties panel to open a new form. If we associate the click event to a function called, for example, ā€œbutton_clickā€, then in our client-side code we can write:

def button_click(self, **event_args):
    open_form('my_form')

There are many examples of this in the forum, and in particular the multi-page app questions and tutorials give more details:

2 Likes

Great! thanks! I don’t have to set the form as an component before open it, right?

No, open_form overwrites the current main form.

If you want to open the form as a sub-form, then you would (for example) add it as a component to something like a column panel.