Show and hide form element based on values of other form elements
Why the in-between form element? You can use the states API to check for a value in a select as well. Just check the student form element and it's value all.

$form['bookpage'] = array(
  ...

  '#states' =&gt; array(
    'visible' =&gt; array(
      ':input[name="student"]' =&gt; array('value' =&gt; 'all'),
      // Use multiple lines here for an AND condition. eg:
      // ':input[name="other-field"]' =&gt; array('value' =&gt; 'all'),
    ),
  )
);


This way you can remove the AJAX callback, and the bookpage_toggle element.

If you want to support multiple conditions, you can wrap the jQuery selectors in another array  to function as an OR:

$form['bookpage'] = array(
  ...

  '#states' =&gt; array(
    'visible' =&gt; array(
      array(':input[name="student"]' =&gt; array('value' =&gt; 'all')),
      array(':input[name="student"]' =&gt; array('value' =&gt; 'other value')),
    ),
  )
);


Finally if you want exclusive OR (XOR) you can do it like this to toggle on one of the elements, but never both of them:

$form['bookpage'] = array(
  ...

  '#states' =&gt; array(
    'visible' =&gt; array(
      'xor',
      array(':input[name="student"]' =&gt; array('value' =&gt; 'all')),
      array(':input[name="student"]' =&gt; array('value' =&gt; 'other value')),
    ),
  )
);


See this comment for AND, OR and XOR and a combination of those.