I realize that this might be an api change, but I am hopping that it will be an API addition so that we do not break things too much...
This basically came up in #2235 where the UX issue is that if we have a series of checkboxes or radios in a form with depended fields that are revealed via #states, then those fields are rendered at the bottom of the checkbox/radio set:

The more options the checkbox/radio set has, the further the user needs to move their mouse down to act on the revealed elements. Also, if this is on a mobile device or if the checkbox/radio set is within a dialog, then there's chances are that the revealed elements will be outside the viewport. The user will either fail to see them or if they are familiar with the specific part of the UI and now their existence, they will have to scroll up/down a lot. That's not very ideal UX.
Using this trick, we might be able to pull off something like this instead (using the options in the "Configure page title" dialog from the "Manage blocks" page):

What I would basically like to be able to do is something like this (notice the addition of the 'attach' =>):
function form_example_radios_with_nested_states_form($form, &$form_state) {
$form['animals'] = array(
'#type' => 'radios',
'#title' => t('Which do you like more?'),
'#options' => array(
'dogs' => t('I like dogs more'),
'cats' => t('I like cats more'),
),
);
$form['dogs'] = array(
'#type' => 'fieldset',
'#title' => t('Good call. What's the name of your favorite dog?'),
'#states' => array(
'attach' => ':input[name="animals"][option="dogs"]',
'visible' => array(
':input[name="animals"]' => array('value' => 'dogs'),
),
),
);
$form['cats'] = array(
'#type' => 'fieldset',
'#title' => t('Why? Cats are weird. Respond'),
'#states' => array(
'attach' => ':input[name="animals"][option="cats"]',
'visible' => array(
':input[name="animals"]' => array('value' => 'cats'),
),
),
);
Recent comments
Thank you for the suggestion and for helping clarify the possible relation between user status and newsletter subscriptions. I followed your advice and opened an issue in the...
Re-enable Simplenews newsletter subscriptions that had been erroneously disabled
@Amilenkov, I agree with your thoughts regarding the relation between subscription and user status. Are you up to open an issue report in the Simplenews issue queue with the suggestion to make...
Re-enable Simplenews newsletter subscriptions that had been erroneously disabled
Usually, I use the detection methods "URL" and "Default", and I'm not very experienced with the "Browser" method. So I've tested your combination of detection methods, and the languages switched...
Language negotiation only working when logged in