Using Iconic Toggle to navigate to another page

I need help setting this workflow,

I want on clicking this toggle icon, when some data types are empty to go to a form.
before it toggles,

I have been going back and forth on these please I need help


Hey @onwukweemeka

You need to check for your datatype before changing toggle value.

Because it’s not possible to change ionic value by action, one idea may be to change the toggle value via preset status and custom states, not by click.

Good to know: Preset status is only considered BEFORE the toggle value is changed by a user.

So the idea is:

You create a group align to parent. (fit to content)

Inside, you put :
-Your toggle, with a custom state controlling the preset status
-Another group, invisible, above the toggle. (fit to content unchecked)

You set your action on click on the invisible group.

There, you can choose to redirect OR to change the custom state of your toggle, which will change the toggle value.

The toggle is never really “clicked” by the user, so the preset status is always considered.

example1
The invisible group is above the toggle and takes all the space available of the wrapper group


Dynamic preset status depending on the custom state value

With this logic, the custom state value toggles from yes to no with the same action.

1 Like

Thank you Thomas

This topic was automatically closed after 70 days. New replies are no longer allowed.