Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional logic in Gutenberg block #54

Open
ascaroit opened this issue Sep 17, 2019 · 1 comment
Open

Conditional logic in Gutenberg block #54

ascaroit opened this issue Sep 17, 2019 · 1 comment

Comments

@ascaroit
Copy link

ascaroit commented Sep 17, 2019

Hi I 'm workin on a Gutenberg block and the conditional logic doesn’t works.

Error in console: An unknown field is used in condition - “crb_show_socials”

in my functions :

Field::make( 'select', 'crb_show_socials', 'Show Socials' )
->add_options( array(
'yes' => 'Yes',
'no' => 'No',
) ),
Field::make( 'text', 'crb_facebook', 'Facebook URL' )
->set_conditional_logic( array(
'relation' => 'AND', // Optional, defaults to "AND"
array(
'field' => 'crb_show_socials',
'value' => array('yes'),
'compare' => 'IN',
)
) ),

Any ideas? is it a bug?

@speedwheel
Copy link

I also have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants