You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow display rules on Editable Field Group.
I have a field group and all of the fields in that group need to be conditionally hidden.
This is cumbersome to mange for the content editor.
In addition if all fields in the group are hidden, the group still shows, but is empty (which makes for a poor end user experience).
The text was updated successfully, but these errors were encountered:
Conditionally hidden group fields means we have to handle required fields.
To do so, I updated SilverStripe\UserForms\Form\UserFormsRequiredFields to check if the group field is hidden.
This is simple enough to do, except I could find the group fields in the form data available in that class.
So, I had to load all the form fields from the EditableFormField table in the database then loop through them in sort order to find the group field.
To do so, I had to load them by the form ID, and this was the only way I could figure to get the ID: $formId = str_replace('Form_', '', $this->form->getName());
Did I overlook something, or is this the best option?
Allow display rules on Editable Field Group.
I have a field group and all of the fields in that group need to be conditionally hidden.
This is cumbersome to mange for the content editor.
In addition if all fields in the group are hidden, the group still shows, but is empty (which makes for a poor end user experience).
The text was updated successfully, but these errors were encountered: