Module has conditional Checkboxes, need to remove value
Add a secondary submit handler to run before the main one:

array_unshift($form['#submit'], 'poetic_toolkit_admin_submit');


Then in that:

function poetic_toolkit_admin_submit($form, &amp;$form_state) {

    // check if field A is checked
    if(!$form_state['values']['poetic_toolkit_mobile_viewport_setting']) {
        // if it is not then set field B value to 0
        $form_state['values']['poetic_toolkit_enable_webapp_setting'] = 0;
    }

}


Then after this the main submit handler will fire and save our updated values.

This will only update the values once the form is saved.

Additionally, you don't want the unchecked condition on the depending item poetic_toolkit_enable_webapp_setting, because then it becomes checked whenever the dependent field poetic_toolkit_mobile_viewport_setting is checked (double negative). You also want to make sure you have the #default_value on the second item set, so that the user see's what is currently set (which will always be unchecked when the first is unchecked but could still be unchecked if the first is checked).

If you want B to become unchecked as soon as A is unchecked then you will need a jQuery solution.