Hi,
I have created tables out of RFGs. But I want to hide the table when a custom field i.e. 'Interview/GD' from its parent view is checked. I tried to hide it with conditional output but in such a situation it affects the other tables too created with the same RFGs.
At present, I am using one Jquery code to hide the table columns when they are empty.
Please help how to resolve the issue.
Based on what I see you didn't add the view that is displaying the table within the conditional shortcode, so it was displaying regardless of whether the value is checked or not.
Earlier I have added the condition. It was working partly, disrupting my other tables as there is a jquery code to hide the empty columns in the table. Hence I have removed the condition. Please have a look. Thanks.
I am re-opening the ticket as I think I need some clarification in this regard. Hope you won't mind. I have applied the same conditional argument (since they are using same custom fields) in another nested view called 'Exam Detailed Syllabus Child', but it didn't respond as I was expecting.
Now let me clarify, does a conditional output depending on a custom field in the parent be put in the nested view? See what I have done in the 'Exam Detailed Syllabus Child' view to hide the heading.
The 'Exam Detailed Syllabus Child' is a nested view in 'Exam Detailed Syllabus' view.
For clarity, is the Exam Detailed Syllabus view a child view ? If I recall correctly this view is a RFG and the Exam Detailed Syllabus Child is a nest RFG correct?
In this case the you wouldn't be able to use the same parent field given that the Parent for Exam Detailed Syllabus isnt the direct parent for Exam Detailed Syllabus Child so the custom field you are using to check isn't available.
However you should still be able to hide this from the Exam Detailed Syllabus view, just add the Exam Detailed Syllabus Child within the same conditional as the table.
See Exam Detailed Syllabus is the parent view and Exam Detailed Syllabus Child is the child view of the previous one. They are in a direct relationship.
I simply want to hide the heading in the child view, not the entire content. Hope you got my point.
I used this code in the child view i.e. Exam Detailed Syllabus Child :
[wpv-conditional if="( $(wpcf-interview-gd-process) ne '1' )"]
<h4><span class="exam-paper">[wpv-loop-index]</span> [wpv-attribute name="exam_param"] [types field="exam-paper-name"][/types][wpv-conditional if="( $(wpcf-exam-paper-name-alias) ne '' )"]: [types field='exam-paper-name-alias'][/types][/wpv-conditional] for [types field='exam-paper-mark'][/types] marks</h4>
[/wpv-conditional]