Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. // Hide q8 if q9 checkbox is checked.
  2. $form['some_question[q8]'] = array(
  3. '#states' => array(
  4. 'invisible' => array(
  5. ':input[name="some_question[q9]"]' => array('checked' => TRUE),
  6. ),
  7. ),
  8. );
  9. // Hide q9 if q8 checkbox is checked.
  10. $form['some_question[q9]'] = array(
  11. '#states' => array(
  12. 'invisible' => array(
  13. ':input[name="some_question[q8]"]' => array('checked' => TRUE),
  14. ),
  15. ),
  16. );
  17.  
  18. // Hide q8 if q9 checkbox is checked.
  19. $form[name="some_question[q8]"] = array(
  20. '#states' => array(
  21. 'invisible' => array(
  22. ':input[name="some_question[q9]"]' => array('checked' => TRUE),
  23. ),
  24. ),
  25. );
  26. // Hide q9 if q8 checkbox is checked.
  27. $form[name="some_question[q9]"] = array(
  28. '#states' => array(
  29. 'invisible' => array(
  30. ':input[name="some_question[q8]"]' => array('checked' => TRUE),
  31. ),
  32. ),
  33. );
  34.  
  35. DrupalComponentSerializationExceptionInvalidDataTypeException: Unable to parse at line 1 (near "':input[name="some_question[q8]"]' = array("). in DrupalComponentSerializationYamlSymfony::decode() (line 40 of .. wwwd8sitewebcorelibDrupalComponentSerializationYamlSymfony.php).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement