Community

Default selected radio button in Views Bulk Operations

Hello. I wonder if you can help me.
I am using views bulk operations to present a choice of three items to the user. I have used the setting 'Force Single' in Bulk Operations Settings to display a radio button instead of a checkbox. I would like to have the first radio button selected by default.
I've tried writing a glue module using hook_views_bulk_operations_form_alter, but have found that although I can alter existing values in the input field containing the radio buttons such as #return_value I can not add the additional #default_value setting. Does anyone know how to do this?
Thanks

Update: I've solved the issue. I wasn't targeting the correct correct array element (and believe me I thought I'd tried them all.). This is the code snippet:
$form['views_bulk_operations'][0]['#default_value'] = TRUE;
where views_bulk_operations is the name of my radios.

nobody click here