0

I'm using the Query plugin that lets me create a Query field on my List & Search.

I have a hidden field with ID 'id_number' which I'm trying to use in my query. When I check the Page Source(Ctrl+U on Chrome), the hidden field has the correct value of id_number which is 22865.

The part of my Query is-

WHERE [MATCH]p.pid||$cck->getValue('id_number')[/MATCH] AND (ban_reason in ("", "active"))

When I print this query out using the Debugger, the Query is using the literal value and querying the above as-

(p.pid LIKE '%$cck->getValue(\'id\_number\')%') ....and not like (p.pid LIKE '%22865%')

I also tried using $fields['id_number']->value, but it still queries it incorrectly.

Should I not use $cck->getValue('id_number') to get the value of the hidden field in the query?

Is there something other than this that I need to use?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.