Currently, on both GF 1.8 & GF 1.9, if you populate a checkbox field with taxonomies it works fine at first. However, if you update your taxonomy terms by adding, editing, or deleting any terms, the form submission can get a validation error if it's a required field and you have only selected a term that has moved to an index position that didn't exist when the last form save occurred.
should get a validation error that the field is required even though you have one selected.
Should go through fine now.
The plugin should handle this automatically. I have an idea on how to fix it using the GF API. Here's some pseudo code:
// hook into actions when terms change
add_action ( 'created_term', 'update_form_taxonomies' );
add_action ( 'edited_term', 'update_form_taxonomies' );
add_action ( 'delete_term', 'update_form_taxonomies' );
function update_form_taxonomies( $term_id, $taxonomy ){
// get current form ID (how do we get this??? maybe save an option in the DB anytime a form is saved with the "Populate with taxonomy" option checked?)
// retrieve the form object using the GF API
$form = GFAPI::get_form($form_id);
// get taxonomies
// loop checkboxes form field with taxonomies that need to be populated and set new checkbox choices accordingly
// update the form using the GF API
$success = GFAPI::update_form($form);
}