Support

Account

Home Forums General Issues Checkbox List Displaying as an Array in Search Reply To: Checkbox List Displaying as an Array in Search

  • Hi,

    Alright. We’ll the problem you have here is that you’re directly calling to the meta value with AJAX search pro and since you are able to select multiple values with the checkbox field those are saved as a serialized array in the DB.

    So instead of directly adding it to ajax search pro like you’re doing now you’d need to add it using a filter or something like the author says.

    Say he gives you an action hook with which you can add the info your function would probably look something like:

    
    function setup_my_checkboxes(){
    	
    	$checkboxes = get_field('my_checkbox_list');
    	if( $checkboxes ){
    		
    		$checkbox_string = implode(', ', $checkboxes);
    		echo ' – ' . $checkbox_string;
    		
    	}
    	
    }