# Conditional rendering for subviews on CO form

**URL:** <https://speciforum.org/t/conditional-rendering-for-subviews-on-co-form/1772>\
**Category:** Get Help\
**Created:** [May 28, 2024, 11:35pm UTC](https://speciforum.org/t/conditional-rendering-for-subviews-on-co-form/1772 "2024-05-28T23:35:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![markp](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/markp/32/1184_2.png) [@markp](https://speciforum.org/u/markp)\
**Post date:** [May 28, 2024, 11:35pm UTC](https://speciforum.org/t/conditional-rendering-for-subviews-on-co-form/1772/1 "2024-05-28T23:35:54Z")

</div>

I am looking to have a checkbox (yesNo4) at the top of the Collection Object form that when clicked will render the form read-only. I have gotten it to be functional for the fields in the Collection Object table itself, however am having difficulty with the related tables.

To start, I have been trying to get the `verbatimLocality` field in the Collecting Event table to be read only when the `yesNo4` field is checked. I started with the condition `collectionObject.yesNo4=Yes`, however changed it to `collectionObjects.yesNo4=Yes` when the linter complained that the former was an invalid relationship. Even with the change, I was not able to achieve the desired result.

I have also tried to get fields in determination to be read-only based on the CO yesNo4, however have so far been unsuccessful.

To test whether it was a limit in my understanding of the relationship syntax in the condition system, I tried making `verbatimLocality` in collecting event read-only based on a field in locality. This was successful, through `locality.localityName=Vancouver` I was able to successful apply the condition.

Just getting the condition to apply from CO → CE, CO → DET and CO → PREP should be sufficient, because then I can make all further relationships read-only by making the associated querycombobox read-only.

What am I missing? Has anyone achieved this?
