Copy link to clipboard
Copied
I have a web app that has a long list of questions, and when answered or not answered, the questions appear on the web app detail page. I would like to know if anyone has a solution for the following:
In a member submitted web app item environment, using the True/False Boolean field type, the customer is given the ability to hide the questions that are not answered, and only show answered ones. I would apply selectors to various elements, and if the field type is check, then it hides those selectors on the detail page.
For example:
1. Question is listed here.
Client answers the question in text field type.
2. Question is listed here.
(No answer)
3. Question is listed here.
Client answers the question in text field type.
[check box] Hide unanswered questions
Select the True/False Boolean field type triggers JS on the detail page to hide all unanswered or targeted selectors and results is such:
1. Question is listed here.
Client answers the question in text field type.
3. Question is listed here.
Client answers the question in text field type.
I can hide the selector results, but not familiar enough with the True/False Boolean field type.
Thanks in advance!
Teejay
Copy link to clipboard
Copied
True false field just returns the value "true" or "false".
In liquid you would just run if xxx == true etc and same in javascript.
Not sure what your asking outside of this Teejay, does not seem to be a real question. You can do what your hoping.
Copy link to clipboard
Copied
Let's see if I can explain the task different (take the boolean out of the equation for now):
In a member submitted web app item environment
In the EDIT mode
We have a web app item field
User enters data
Then has a choice to hide the aforementioned field on the detail page
I was thinking using the yes/no boolean field where the customer checks the box, and when submitted, I can hide what ever I choose to hide on the Detail page.
Does this help?
Copy link to clipboard
Copied
Can you enlighten me a little on this? Any references?
"In liquid you would just run if xxx == true etc and same in javascript."
Copy link to clipboard
Copied
I am not sure Teejay, what your after.
First post - Yes
To your second question, I am not sure what your after. IF it is jquery..
{% if SHOWTHISFIELDTARGET == true -%}
THE FIELD INPUT
{% endif -%}
And similar with javascript. This is just basic conditional wrapping.