• Good Day,

    I’m trying to create a custom post meta box that allows a user to select multiple boxes/cells in a grid view. My idea is similar to creating a multiselect or checkbox group, but I don’t know how to implement all the options.

    array(
    				"name"			=> "grid_options",
    				"title"			=> "Test Grid",
    				"description"	=> 'Select the options from this grid',
    				"type"			=> "grid",
    				"scope"			=>	 array( "post" ),
    				"capability"	=> "edit_post"
    
    			),

    …customFields function case:

    https://pastebin.com/QRHXrCs5

    This only displays the table as I need it, the <input> code is where I’m having an issue. I can use jQuery to manipulate the value of the input when a user clicks on a table cell and it posts the array, but I don’t know how to store that array of selections into the post meta when the post is saved/updated.

    I’ve thought of using a “checkbox group” but from my understanding, then I have to specify all 1152 options before-hand in the meta-box array, which is definitely not ideal.

    Any idea’s on how to accomplish this would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Flabadab

    (@flabadab)

    Managed to figure it out. For some reason the function I used for saving the functions kept skipping over the checkbox group. I had to specify the checkbox group update_post_meta separately and it now works.

    is there any new theme of this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Multi Select Grid’ is closed to new replies.