Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Field Conditions #278

Open
lukecarbis opened this issue Apr 11, 2019 · 5 comments
Open

Field Conditions #278

lukecarbis opened this issue Apr 11, 2019 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@lukecarbis
Copy link
Member

lukecarbis commented Apr 11, 2019

Depending on the value of another field in the same block, whether a field should be displayed or not.

If field_one is equal to foo then hide field_two.

@lukecarbis lukecarbis added the enhancement New feature or request label Apr 11, 2019
@lukecarbis lukecarbis added this to the 1.4 milestone Apr 11, 2019
@bbertucc
Copy link

@lukecarbis, just ran into two cases for field conditions:

First use case:

It takes two fields to build a button in my block: a "button-text" field and a "button-url" field. The user keeps entering in "button-text" without "button-url". Ideally, both fields would be required if they are using one of them.

Another use case:

A user can choose between a background image or a background color from a "background" select field in a block. If they choose a background image, the image field should conditionally show. There is no reason for the background image field to show if they chose a color for the background.

@aimeed
Copy link

aimeed commented Oct 18, 2019

Hi there, I'm a web project manager at cultureamp.com and we would really love the ability to use conditional fields. Can you provide an update on the priority and timeline for this issue?

@kienstra
Copy link
Collaborator

kienstra commented Nov 18, 2019

Question about scope

Hi @lukecarbis,
Sorry I missed you yesterday. Could you please help with a question about the scope here?

Depending on the value of another field in the same block, whether a field should be displayed or not.

It sounds like this issue does not include conditions that apply to the entire block, right?

There are already some, like:

condition-block

Some more block-level conditions, like ACF has, might be 'if current user is logged in' or 'page template is default template.'

It sounds like the only conditionals in scope here are field-level. Is that true?

For example, in ACF:

condit-field

Thanks, Luke!

@lukecarbis
Copy link
Member Author

Yes, only field level. We could consider opening separate issues for other options – but to my knowledge there's been no demand for that level of functionality.

@kienstra
Copy link
Collaborator

Thanks, that sounds great.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants