Multiple Selecet field values are not saved

Support General Multiple Selecet field values are not saved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5178
    socialitysociality
    Participant

    Hello, I am using a multiple select field under the development version plugin but the values are not being saved. The same for the button select all/none, it does not work.

    Thank you.

    #5182
    Anh TranAnh Tran
    Keymaster

    Can you post the code you use? It seems to work for me 🙁

    #5183
    socialitysociality
    Participant

    Yes,

    The strange thing is that it works for posts post type but not for the attachment post type. This is it:

    		$meta_boxes[] = array(
    		'title' => esc_html__( 'Artist Info', 'colours-of-a-journey-plugin' ),
    		'post_types'  => 'attachment',
    		'media_modal' => true,
    		'fields' => array(
    			array(
    				'name'		=> esc_html__( 'Theme tags (select one or more values)', 'colours-of-a-journey-plugin' ),
    				'id'		=> $prefix . 'attachment_theme_tags',
    				'type'		=> 'select',
    				'options'	=> array(
    					'past'		=> esc_html__( 'Past', 'colours-of-a-journey-plugin' ),
    					'present'	=> esc_html__( 'Present', 'colours-of-a-journey-plugin' ),
    					'future'	=> esc_html__( 'Future', 'colours-of-a-journey-plugin' ),
    					'home'		=> esc_html__( 'Home', 'colours-of-a-journey-plugin' ),
    					'nature'	=> esc_html__( 'Nature', 'colours-of-a-journey-plugin' ),
    					'passage'	=> esc_html__( 'Passage', 'colours-of-a-journey-plugin' ),
    					'peace'		=> esc_html__( 'Peace', 'colours-of-a-journey-plugin' ),
    				),
    				'multiple'			=> true,
    				'select_all_none'	=> true,
    			),
    		),
    	);
    
    #5189
    Anh TranAnh Tran
    Keymaster

    Ah, I got it. Unfortunately, this is the limitation of the plugin when working in the modal mode. WordPress limits how fields are outputted and saved. We also can't enqueue JavaScript for it as well. So, please just use the simple fields there.

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