Support of @conditional_fields

Created on 12 April 2024, 8 months ago
Updated 18 April 2024, 8 months ago

Problem/Motivation

This module is awesome but missing one important feature - hide specific fields if not needed (based on customer or so).

Is it possible to add ability to display all -fields when using @ /project/conditional_fields β†’ ?

Currently i can see just a custom field and it is possible to hide it so it works well, however it is not currently possible to set condition also to fields inside a custom field.
In views it was also not possible to see all fields, but since 2x.dev it is possible to select display also specific fields in views, so I believe it could be possible to do the same with conditional fields module?

Example : custom_field named "milestone" has 3 dates like "baseline", "forecast" and "Actual" date when the job is actual done. However some customers would like to see just Actual date field so need to hide based on customer (select list or taxonomy) fileds baseline and forecast. But currently not possible so I still need to create 3 normal dates fields instead...

Thank you.

πŸ’¬ Support request
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia coaston

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @coaston
  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    Theres a "hidden" formatter for every field in the manage display settings. Is that what you're after or are you wanting to hide them in the form? The form fields havn't been tested with conditional fields module but would assume they aren't even recognized. You could do this with hook_form_alter and the #states api if you really needed that functionality too.

  • πŸ‡ΈπŸ‡°Slovakia coaston

    Thank you - you are right. Not recognized at all. Would appreciate your help with this in case you have some spare time to check.

  • Status changed to Closed: works as designed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    I don't really have time to provide a solution here as I'm not going to support the conditional fields module. That module is using the states api under the hood so all i can suggest is doing a hook_form_alter in your own custom module and using #states api for the visibility you need on these individual fields. Google search and/or AI may be way more help for you on this than me if you need full examples. Thanks.

Production build 0.71.5 2024