I can create a checkbox group like so:
$checkboxes = WP_Form_Element::create( 'checkboxes' )
->set_name( 'interests' )
->set_label( 'Interests' )
->add_option( 'something,'Something' )
->add_option( 'something_else', Something else' );
Cool.
But if I'm grabbing data from the database (after the form has been submitted), how do I show which options have been selected.
$checkboxes->set_attribute( 'checked', 'checked' );
Will sets all the attributes to checked. There doesn't seem to be anything I can find in the docs about this. Any tips!?