Problem with metabox group fields readonly and disabled

Support MB Group Problem with metabox group fields readonly and disabled

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12593
    MrHuberMrHuber
    Participant

    I'm using metabox with metabox group and all inputs of the group are disabled and readonly. So I tryed the attributes

    "attributes" => array(
        "disabled" => false,
        "required" => false,
        "readonly" => false,
    ),
    

    Now I can write into the boxes, but the data is not saved. Here is my code:

    
    $meta_boxes[] = array(
        "id"         => $prefix."entries",
        "title"      => __("Further Information", "myTool"),
        "post_types" => array("entries"),
        "context"    => "normal",
        "priority"   => "high",
        "fields"     => array(
            array(
                "id"      => $prefix."type",
                "name"    => __("Icon", "myTool"),
                "type"    => "radio",
                "class"   => "type",
                "options" => array(
                    "cow"         => __("cow", "myTool"),
                    "pig"         => __("pig", "myTool"),
                    "poultry"     => __("poultry", "myTool"),
                    "plant-based" => __("plant-based", "myTool"),
                ),
            ),
            array(
                "id"      => $prefix."regionentry",
                "name"    => __("Region entry", "myTool"),
                "type"    => "group",
                "fields"     => array(
                    array(
                        "id"    => "desc",
                        "name"  => __("Description", "myTool"),
                        "desc"  => __("Description text in detail", "myTool"),
                        "type"  => "textarea",
                        "class" => "desc",
                    ),
                    array(
                        "id"       => "climate",
                        "name"     => __("Climate", "myTool"),
                        "type"     => "select",
                        "class"    => "climate",
                        "multiple" => false,
                        "options" => array(
                            "recommended" => __("recommended", "myTool"),
                            "think-twice" => __("think-twice", "myTool"),
                            "avoid"       => __("avoid", "myTool"),
                        ),
                    ),
                    array(
                        "id"       => "diversity",
                        "name"     => __("Diversity of species", "myTool"),
                        "type"     => "select",
                        "class"    => "diversity",
                        "multiple" => false,
                        "attributes" => array(
                            "disabled" => false,
                            "required" => false,
                            "readonly" => false,
                        ),
                        "options" => array(
                            "recommended" => __("recommended", "myTool"),
                            "think-twice" => __("think-twice", "myTool"),
                            "avoid"       => __("avoid", "myTool"),
                        ),
                    ),
                ),
                "clone"      => true,
                "sort_clone" => true,
            ),
        )
    );
    
    return $meta_boxes;
    

    I'm using this versions:
    Metabox version Version 4.15.8
    Metabox group Version 1.1.2
    Metabox updater Version 1.3.0

    #12604
    MrHuberMrHuber
    Participant

    I found the problem. If your license is expired the wordpress plugin is not loading all of the plugin code. So it is buggy if you are using pro stuff. +1 for no error message or warning when I'm entering the licence code ... took me a whole day to figure that out.

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