[New Plugin] Beautiful & Custom Toggle

Hey @gary.abouaf – thanks for the question!

Yes, it’s absolutely possible to set the toggle with a database value. All values on the plugin can be set on the element using dynamic expressions (a search in the database) and they can also be set via workflow actions (with dynamic expressions too).

Let me know if you have any questions!
Alex

Thank you !

You’re welcome @gary.abouaf! Let me know if you have any more questions!

I am having this same issue. Did you ever get this resolved?

No, I used an other toggle plugin (free…) despite I baught the full licence for this one.

That’s tough…I spent about 7 hours trying to figure out what was causing my RG to disappear. Never would’ve thought it was the toggle, but it def was the issue. I switched to Ionic Toggle (free).

1 Like

you have also th Better Toggle plugin which works fine and which is more customizable (free also).

1 Like

Hi @cdp2231 – thanks for the feedback! I believed that I jhad fixed the issue but I will double check to ensure that it’s fully working with repeatinggroups and get back to you within the week.

Alex

1 Like

Hi, when to you think you will deploy the update, solving issue with RG ?
Thanks

Hi @almi.77.dev – thank you so much for your patience on this one and apologies for the slight delay.

I’ve pushed a fix in v1.6.15 of the plugin. Once you’ve upgraded to the latest version, it should work properly. Don’t hesitate to let me know if you spot any other issues!

Best,
Alex

1 Like

Hi Alex, just updated, and works fine, with dynamic behaviour linked to data :+1:
Thanks

@almi.77.dev – great to hear it’s working well for you! Please don’t hesitate to reach out if you have any other feedback.

Is it possible to activate the toggle by changing states or via a workflow? I have an area where customer clicks button “ACTIVATE” on a popup, which then should change the toggle to yes. Currently setting value via User.

I’ve found that the toggle doesn’t work within repeating groups. If i click a filter it loads 1 results only, i then have to click the filter again to get the 2nd result. If i remove the toggle from the repeating group all the results load immediately.

@reeceb thanks for reaching out! Hmm I wasn’t able to reproduce that issue. Could you share with me a link to that via a DM?

Hi @alex4,
I have a RG

that takes to a Group A showing the details of the selected thing:

In this Group A there’s a BeautifulToggle (v.1.6.15) who’s “Preset Status” is dynamic and reads if the current thing contains value X in a certain field.
The first time I show Group A, the toggle shows the right value but if I select a different thing, the toggle shows the wrong value (the right value is shown by the checkbox)

From this moment, regardless the thing I pick, the toggle shows NO when it should show YES.
The weird detail is that if I go in debug mode and point to the toggle showing a wrong NO, I see that the “Preset Status” is YES.

As a workaround I tried to use “Change Toggle Value” in a WF before displaying Group A (an action that should not be needed as the value is dynamic) but I get the below error and the entire page gets broken and nothing can be clicked anymore.


Thanks in advance for your help.
gl

Hi @gianluca1 – thanks for reaching out! Could you DM me a link to the editor of that page please so I can take a look?

Thanks!
Alex

Hi @alex4 thank you but I managed to find a solution.
What really makes things complicate in that the event “a toggle is changed” can be triggered both by the user of the page and a WF. It would be much easier to use if you had 2 separate events:

  • a toggle is changed by the user
  • a toggle is changed by a workflow

Thx

hey, @gianluca1 - I am having the same error/bug. How did you resolve the issue?

Hi, you have to try separating the following 2 cases

  • the toggle is changed by the user
  • the toggle is changed by a workflow or by the page.

The latter can happen if the page is always the same but shows different data depending on user selection. In my case the page is showing the details of a specific shop picked from a list. Depending on the selected shop, the toggle is supposed to be on or off but changing shop triggers “a toggle is changed”.

I managed the above with a popup asking confirmation for the choice. The popup has a CANCEL and an OK button. It also has a custom state “working on toggle” with default “no”. Let’s say that the value in db to be set to Y/N is named “Choice”.

IF toggle is changed and working on toggle = no
THEN show popup with a custom text depending if Choice is currently Y or N.

IF OK is clicked and Choice =N, THEN
Set working on toggle = yes
Set Choice =Y
Change toggle so that it is equal to Choice
Set working on toggle = no
Hide popup

IF CANCEL is clicked and Choice =N, THEN
Set working on toggle = yes
Change toggle so that it is equal to Choice
Set working on toggle = no
Hide popup

You should then add similar WFs for when the starting situation is Choice = Y