This thread is resolved. Here is a description of the problem and solution.
Problem:
The user would like to display some fields, on a form, when a relationship field has a value.
Solution:
Currently, Forms do not have a way to conditionally display fields based on a "relationship" field. We can work around this limitation with a custom Javascript code
thank you for your answer. Before I try to do that on my own, I have a simmilar question.
I made a conditional group in a form, where the user have to choose from a dropdown with parent informations. The parent (company) from the owner is shown. I try to show the group, if the user selected his company.
What do I have to fill instead of the ??????? to get this check if it not empty? I read the documentation and try it with some of the booleans like !EMPTY, but nothing is working.
Thank you for helping me to understand toolset a little bit better.
I am really sorry, I did not check this for the first time.
The workaround that remains, is to use custom Javascript code to show/hide a section based on the value of the relationship field in the form. I created an example where we hide the submit button until a parent has been entered with the following Javascript code:
jQuery(function($){
var select = $('select[name="@company-job.parent"]');
var form = select.closest('form');
var submit = form.find('input[type=submit]');
if (select.val() == '') submit.hide();
select.on('change',function(){
if (select.val() == '') submit.hide();
else submit.show();
})
})
You can check my example on the following site hidden link
I hope this helps. Let me know if you have any questions.