Issue with Conditional Success and Error Messages in ChronoForms 6 on Joomla 3.8

Deddese77 17 Oct, 2024

Hello!

I am using ChronoForms version 6 on Joomla 3.8 with PHP 7.3. (Currently, I cannot update to other Joomla or PHP versions). I have configured an anonymous reporting form, aiming for the form to display a confirmation message to the user if the email is successfully sent and an error message if the email fails.

At present, both "Confirmation Message" and "Error Message" actions are set up within the Submit section of the form. In the submit-action tab, I have arranged the following actions in order: email, message (confirmation), message (error). However, it is not working as expected. In both cases (whether the email is sent successfully or fails), the form displays both messages instead of showing only the appropriate one.

Attempts to solve the issue:

  • I tried positioning the message actions both before and after the email action, without success.
  • I considered using conditions such as {email1.success} and {!email1.success}, but I am unsure how to implement these conditions correctly in ChronoForms or where to insert this conditional logic.

Request for support:

I need detailed instructions on how to correctly configure conditions for the messages so that:

  1. Only the confirmation message appears if the email is sent successfully.
  2. Only the error message appears if the email fails to send.

Thank you for your assistance.

Max_admin 18 Oct, 2024

please post a screenshot of your submit area with the actions you mentioned

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Deddese77 18 Oct, 2024

Hello,

here a screen shot with details of submit area.

Thank you

02---test---Copia.jpg
Deddese77 18 Oct, 2024

Here other two screenshot.

1)Load and submit areas in views tab

2) view of the site after submission

03 - test.png

Load and submit areas in views tab

04 - test.png

view of the site after submission

Max_admin 18 Oct, 2024

You need to check the email action result variable, it will be under {var:email_action_name}, use this is a switch action

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Deddese77 21 Oct, 2024

Dear Max,

Is what you’re referring to found in the screenshot I’ve attached? "If condition"? "Switch", "Event switcher"? In which position? Are the steps I should take detailed on pages 30-34 of the ChronoForms6 manual? 

I would be grateful if you could guide me through the necessary steps and ensure I’m implementing the action properly for this scenario. As this is an anonymous reporting form, it’s essential that users receive proper feedback on whether the email has been sent successfully or not, and this is crucial.

Something like 'ChronoForms for Dummies 😆

Thanks

Immagine 2024-10-21 071837.png
Elita- 21 Oct, 2024
1 Likes

Hi,Deddese77 

As Max wrote, you should use Switch action, use {var:email1} as data provider. in Values setup there should go something like this ->>  sucess:{view:message2} error:{view:message3}  (or fail or something else - you should check)

Max_admin 15 Nov, 2024

Event switcher is easier, use {var:email1} for the switch value and set the events as 1 & 0, what do you get in the form debug after the email is done ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger