Conditional Fields
4/11/2022 / By Tom Jaeger
ExpressionEngine 7.5 has been Released! Learn More!
4/11/2022 / By Tom Jaeger
Today we’re excited to release conditional fields as part of ExpressionEngine 6.3.0. Conditional fields bring the ExpressionEngine content administration experience to the next level. It does this on the fly by changing the fields that are available and required based on content input into the entry in real-time.
Let’s look at a simple example.
If you have an Events channel in ExpressionEngine, you may have a toggle for that event to determine if it’s a digital event or an in-person event. Something similar to the following:
You would then generally have a setup where the “Zoom Link” field and “Address” field would always be present on the publish page. That would leave you with a decision to either make them both required, optional, or a combination thereof. Neither of these options is optimal, as one of them in theory shouldn’t be used on a given event.
With conditional fields, if the toggle is set to digital, we would want to have the “Zoom Link” field and have that field marked as required. At the same time, if the toggle for the event is set to digital, we can have the “Address” field hidden.
However, if the event is not digital, we would want a simple grid field for the address. Likewise, we would also want the grid field to be required.
Before conditional fields, you would have both of these fields present simultaneously, and either have all of them required, or none of them required. Neither of these is an ideal solution to ensure content integrity on your site.
You can now give content admins the flexibility they need with conditional fields while retaining content integrity.
Simply put, it’s a more effective way to ensure content integrity as well as a better content admin experience.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.