Implementation of custom state

A page has been created on which there are two forms, Sign In and Sign Up. In the header there is a menu item Sign In and when clicked the corresponding form appears (the registration form is hidden). If the User is not registered, he clicks the link Sign Up and the form Sign in is hidden and appears Sign Up form.
How to implement this WeWeb?

in weweb you can create variables that can be modified with workflow actions. To conditionally show an element you can bind the display property of the element to the value of a variable.

2 Likes

Thanks for the referral, I’ll look into it.

Hey @dorilama . Good to see you here over from Bubble! Really getting into WeWeb too, just wondered what’s your advice on app and page structure, like in Bubble we’d have a page with our navigation etc go to the same page when the user clicks an option, add the relevant path to the URL and when the Page Loaded event gets triggered, read the URL path, maybe store in a custom state, and decide which group gets shown and hidden based on that.

I know it’s easy to show and hide sections based on variables but what about routing using URLs? I’ve seen advice where you have a page per area of the app and just copy sections to replicate top level elements such the nav bar and header onto each page, not sure I’m keen on doing that or just using variables to show and hide sections. I mean it’s not a showstopper by any means but …

Any advice on this for an old Bubbler? :+1:

1 Like

Hello and welcome :slight_smile:
It depends on what you want to do.
If you want to show/hide some element you can use variables and the display property or conditional rendering. You have many types of variables, including query.
If you want to change page entirely weweb is already a single page application, you can just create a new page and weweb will take care of the routing when navigating with a workflow. If you have shared sections between pages you can save them and create an instance to reuse them.

2 Likes

Many thanks for getting back. I get it, feels a bit odd but I suppose every system is different and can’t expect a total 1:1 matching of every method. I’ll have a play and see which works the best for navigation.

Thanks again :+1:

1 Like