@genxcoders, as mentioned in the docs on Conditional fields (viewtopic.php?f=5&t=11512#p30702), you are free to use any Couch code in the conditional logic for the *backend* processing (i.e. server-side processing done by Couch when the form gets posted); however, for the frontend JS only a very limited subset of Couch tags and editable regions are supported. Namely, only type 'checkbox', 'radio' and 'dropdown' editable-regions are supported by the automatically generated JS.
As you can see, type 'relation' will not work when it comes to frontend hiding/showing of fields dependent on it is concerned.
As a workaround, you'll have to supply your own custom JS using <cms:alt_js> tags (as shown at the end of the post mentioned above).
That said, you mentioned -
If type 'dropdown' suits you better, you can easily make it dynamic as shown here -
viewtopic.php?p=2483#p2483
Please try this second approach also and see if it helps.
As you can see, type 'relation' will not work when it comes to frontend hiding/showing of fields dependent on it is concerned.
As a workaround, you'll have to supply your own custom JS using <cms:alt_js> tags (as shown at the end of the post mentioned above).
That said, you mentioned -
I earlier was using type=dropdown, but then when a user adds a new value which is in relation then it will need to be added separately to the dropdown editable.
If type 'dropdown' suits you better, you can easily make it dynamic as shown here -
viewtopic.php?p=2483#p2483
Please try this second approach also and see if it helps.