Nested event switcher and variable value containing spaces not being actioned

wallyhowe 14 Apr, 2025

I have a very strange occurrence.

Within a Submit I have an Event Switcher and inside there are 3 further Event Switchers.

The first and third of these Event Switchers have the  expected values set as Tennis, Squash, Tennis & Squash

The first one accepts fields in all 3 event boxes.

The third one does not accept fields in the event box for Tennis & Squash. Fields can be placed into the box but on saving the form the box is emptied.

If I change the value to TennisSquash without any spaces the fields get accepted and remain after the form is saved.

Wallyhowe

Screenshot event switchers.png
Screenshot of Submit tab content with event switchers
Max_admin 14 Apr, 2025
Answer

Hi wallyhowe

That's expected, do not use spaces in the events names, the value you switch should provide them without spaces

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
wallyhowe 15 Apr, 2025

Hi Max

Interesting that the string value to be tested was accepted higher up the form.

Also, this form is an upgrade from a Chronoforms 7 form where the equivalent worked fine. So in effect this is a change between 7 and 8.

Whatever, is the recommended way of using the Event Switcher in 8, where the field to be tested is a string that may contain spaces, to test the value using PHP and return a variable that becomes the subject of the test?

Wallyhowe

Max_admin 15 Apr, 2025

Hi Wallyhowe

it's just an untested part and the result is unexpected, I advice against using spaces in events names, if it works for you then that's fine

I tested it and it works if you drag the field and drop it outside the event switcher first, then drag it inside the switcher

What is your events provider ? if it's a field data like a dropdown then make sure all values are without spaces, but if you are switching a more complex value then you can use PHP, PHP has it's own Events behavior which you can use directly for the switching

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
wallyhowe 15 Apr, 2025
1 Likes

Hi Max

The events provider field is a text field denoting the type of membership at our sports club. Hence the spaces.To be safe I will use PHP to control the switching..

Many thanks

Wallyhowe

You need to login to be able to post a reply.