This topic is locked

SearchController

11/13/2018 7:38:43 PM
PHPRunner General questions
A
Andrew S author

Hi
PHP Runner 9.8 using Bootstrap
I have a list page with both Search and Advanced Search available.
I want to add NOT_CONTAINS as an additional option. I have tried adding NOT_CONTAINS as per the manual - I have tried adding event to List Page Javascript onload event and also tried adding on Search page Javascript onload event but neither way shows Not Contains in the available Search Criteria
var srch = pageObj.getSearchController();

var field = srch.getSearchFields()[0];
field.addOption(Runner.search.options.NOT_CONTAINS);
What am I doing wrong or have misunderstood ?
Thanks

Andrew

admin 11/14/2018

It definitely works on List page with search panel. I recommend to use Search API though:

https://xlinesoft.com/phprunner/docs/searchapi_about.htm

A
Andrew S author 11/14/2018

Thanks Sergey
Unless I have misunderstood, I was under the impression that I could add NOT_CONTAIN to the existing list using the Javascript in manual. That is what is not working. Have done full build and still no difference.
I will take a look at the link for inspiration later.

admin 11/14/2018

Like I said, it does work on the List page. It is just an older API and being deprecated.