mustardBees/cmb_field_map

add support for 'required' attribute

Opened this issue · 0 comments

Adding the 'required' attribute doesn't affect this field. :(

    // Event Coordinates
    $bo_open->add_field( array(
        'name' => __('Event Mapping Location', 'bo_cmb2' ),
        'desc' => __('Regardless of the number of properties, pick a spot on the map to represent the "center" of your event)', 'bo_cmb2' ),
        'id' => $prefix . 'location',
        'type' => 'pw_map', //only does lat+long, per https://github.com/mustardBees/cmb_field_map/issues/22
        'split_values' => true, // Save latitude and longitude as two separate fields
        'attributes'  => array(
            'required'    => 'required',
        ),
    ) );