Custom Fields
Re-Envisioned
Support Meta Box Conditional Logic Sugestions of exists operator

  • Creator
    Topic
  • #17966
    Jackky
    Participant

    Hi, I’m trying to do this type of logic: when user filled single_image either text field, the other field is brcomes hidden. That’s how I reached the goal for one field with match operator, but I can’t make text field hidden if image is selected, so I suggest to make some operator, like ‘exists’ or ‘not empty’.

    
    
                    [
                        'id'              => 'logo',
                        'type'            => 'single_image',
                        'name'                => 'Лого',
                        'hidden'            => [ 'title', 'match', '.+' ],
                    ],
                    [
                        'id'              => 'title',
                        'type'            => 'text',
                        'name'                => 'Текст',
                    ],
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #17990
    Anh Tran
    Keymaster

    Hi, I haven’t tested but I think a rule like ['logo', '!=', ''] should work. Can you please try it.

    #17997
    Jackky
    Participant

    I’ve tryed different combinations, and this too, but nothing works as I want

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Newsletter

Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.


grid gear info copy caret-up caret-down trash