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).
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).
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.
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!
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.
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.
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:
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