After that, I display nodes in my sortedResults var.
The logic behind this is it checks if "subject" is contained in each checkedsubject (comma separated). So, is subject = "math", it looks is "math" is checked in $checkedSubject. My main trouble is if there's more than one subject in the node property.
So, do you know how I can compare two comma separated list?
Is the selection based off of the subject properties? (So that if a subject has the value "math,numbers" there's only a single checkbox for those, or will there be a "math" checkbox and a "numbers" checkbox?)
If you split both lists using the Split() extension, you should be able to select only those from the second that have a corresponding value in the first.
In the property there is a checkbox for each subjects and (front end) in the form there is a checkbox for each choices. So, I'll try to split each list and compare them... thank you for the idea.
Look for multiples strings in property
Hi guys, I have nodes with a "subject" property which can contain 1 or more subject (ex. : sciences or sciences,math,history, etc...)
Visitors on site can select one or more subject with a checkbox form and I'd like to display the nodes which contains only the subject they choose.
After that, I display nodes in my sortedResults var.
The logic behind this is it checks if "subject" is contained in each checkedsubject (comma separated). So, is subject = "math", it looks is "math" is checked in $checkedSubject. My main trouble is if there's more than one subject in the node property.
So, do you know how I can compare two comma separated list?
Hi Profiterole,
Is the selection based off of the subject properties? (So that if a subject has the value "math,numbers" there's only a single checkbox for those, or will there be a "math" checkbox and a "numbers" checkbox?)
If you split both lists using the Split() extension, you should be able to select only those from the second that have a corresponding value in the first.
/Chriztian
In the property there is a checkbox for each subjects and (front end) in the form there is a checkbox for each choices. So, I'll try to split each list and compare them... thank you for the idea.
is working on a reply...