Hiding and unhiding fields

How to hide or show form fields based on user conditions in ChronoForms 8.

Overview

The issue arises when trying to use custom PHP code to dynamically hide or show form fields, which worked in CF5 but causes errors in CF8.
Use the ACL behavior on individual form elements to control visibility by user view level, or adjust dynamic data sources for fields like dropdowns based on user groups.

Answered
ChronoForms v8
bu bulbo 04 Mar, 2024
Hi Max, GH, everybody. I hope You're all doing well.

I have a couple of questions.

Question 1)
In Chronoforms 5 I used to hide components according to the need.
For example after entering first data I was unhindin new forms. Or I was hiding some forms reserved to users belonging to more advanced groups.
I was doing so entering before the forms a custom php code with a "{" (see attachment).
In Chronoforms 8 I'm getting error if I try to do the same with a "</> PHP $" component.
Is there a way to hide/unhide forms (text areas, dropdown etc) according to specific situations?

Question 2)
Is there a way to make a search in the forum? I couldn't fine a search field.

Thank You all and have a great day!!!
Screenshot 2024-03-04 220004.png
Hiding/unhiding code before the component. After the component there was in CF5 another php code simply with "}".
Max_admin Max_admin 07 Mar, 2024
Answer
1 Likes
Hi bulbo

in v8 you can control which user view level can access the form under the form settings

if you want to control the view to any form element then use the ACL behavior under that form element, you can choose the view level there too

The forums are being improved but we could not add a search feature yet, you may howvere use Google:
site:chronoengine.com whatever
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
bu bulbo 07 Mar, 2024
Max Thank You very much for the Google tip!
It's a pity that the control can be provided only according to the view level and not according to the group the user belongs to.
As workaroud, I'll use the dynamic options, i.e. changing the data source (in Dropdowns, Checkboxes Group, etc) according to the Joomla user's group.

Chronoforms 5 was excellent, but the 8th version with some feaures more could become even better. Compliments!

sergio-bulbo
bu bulbo 08 Mar, 2024
Actually I'm finding difficulties to hide the text and textarea fields.

The Wizard Settings are containinig the Enable/Disable option, but it can be changed only manually.
It would be great if in the future this could be also driven by a custom function.

Have a nice day!
This topic is locked and no more replies can be posted.