Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter gplaurin

    (@gplaurin)

    Hi !
    Using the add_meta_box('forfait','Forfaits','forfaits_meta','page'); I have put a box under the editor, in this box i have a multiple select. The user can add some package into the multiple select by entering the package name into a textbox and clicking add, then the text is add to the multiple select.

    But when I save my page using add_action('wp_insert_post', 'my_function'); and then in the function my_function I tried to retrieve my multiple select (includedpackage) with:
    $packages = $_POST['includedpackage'];
    $packages is empty

    BUT I FIND THE SOLUTION !
    It was easy, when I was saving my page, there was none item selected in my multiple select so nothing was post !

    Thanks
    GP

Viewing 1 replies (of 1 total)