Conditional Logic not seems working with multiple metaboxes on front-end

Support MB Frontend Submission Conditional Logic not seems working with multiple metaboxes on front-endResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8634
    brkardbrkard
    Participant

    Hi.
    Conditional Logic not seems working with multiple metaboxes on front-end.

    For example:

    [mb_frontend_form id="switch_field,text_field"]

    Text field metabox is visible if swithc_field is on.

    This Conditional Logic is working in backend, but not working in front-end.

    Thanks.

    #8645
    Anh TranAnh Tran
    Keymaster

    Hi,

    Can you send me the code of the meta box to check?

    #8769
    aristoaristo
    Participant

    Hi, I'm having the same issue. I'm calling the shortcode in a modal window on the frontend.

    The metabox working fine with conditional logic on the admin side. Basically, the meta fields are getting hide/show on the defined conditions. But, the condition doesn't apply on the frontend side.

    #8771
    jcleavelandjcleaveland
    Participant

    I think I'm having the same issue. I thought it was me.

    I've tried it both ways below with no success. I can get a field to be hidden with only one condition like this:

    
    array(
    	'id' => $prefix . 'services',
    	'name' => esc_html__( 'Services', 'obh' ),
    	'type' => 'taxonomy',
    	'placeholder' => esc_html__( 'Select Services', 'obh' ),
    	'taxonomy' => 'obh_note_services',
    	'field_type' => 'checkbox_list',
    	'inline' => true,
    	'columns' => 6,
    	'query_args' => array(
    		'meta_key' => 'obh_active_tax_selector',
        		'meta_value' => 'yes',
    		'orderby' => 'meta_value_num',
    		'order' => 'ASC',
    	),
            'visible' => array( 'obh_note_type', '78' ),
    	'toggle_type' => 'fade'
    

    **The numbers are the ID of the term that is displayed as the field value in the form

    But, I cannot get multiple conditions to work. I've tried both of these methods (obviously not at the same time):

    
    'visible' => array( 'tax_query[note-type]', 'in', array( 78, 79 ) ),
    					
    'when' => array(
    	array( 'obh_note_type', 78), 
    	array( 'obh_note_type', 79),
    	array( 'obh_note_type', 80), 
    	array( 'obh_note_type', 81), 
    	array( 'obh_note_type', 82), 
    	array( 'obh_note_type', 83), 
    	array( 'obh_note_type', 84), 
        ),
    ),
    'relation' => 'or',
    'toggle_type' => 'fade'
    

    Thanks for your help!

    #8788
    Anh TranAnh Tran
    Keymaster

    Hi Jason,

    Can you post the full code of the 2/3 fields that have the conditions to check?

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