This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
12 Posts
10 months ago


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]||$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 follow-

( LIKE '%$cck->getValue(\'id\_number\')%') ....and not something like ( 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? Or is there something other than this that I need to use?

Get a Book for SEBLOD
10 months ago
Level 1

Hi Manish

If you refer to this plugin ( it's true it doesn't allow to fetch values from other fields present on the page.

This is why we had to developp a quite modified version of this plugin to be able to add some PHP code inside. This way we can retrieve anything we want

But I would prefer Seblod proposes an enhanced version of their plugin



10 months ago
Level 2

Another better way to achieve this would be to use the BeforeSearch code field and generate the query  through PHP/SQL code as a string to inject in the search query field. 

Get a VIP membership