This topic is locked

Edit box with AJAX popup middle set of charachters

3/13/2017 9:27:30 AM
PHPRunner General questions
author

Hello, I have an Add page that one of its fields is set to Lookup Wizard Edit box with AJAX popup, but when i search only for the starting character for example when I enter 'co', it will show 'Corolla' but wont show 'Accord'.

For i have to enter % in the field . I am looking for a way to let Ajax search for a set of charterers wherever it is . I am using phpr 8.1

HJB 3/13/2017

https://xlinesoft.com/phprunner/docs/ajax_features.htm
The application will look for the occurrence of the typed in string anywhere in the list. For example, when you enter 'co', it will show 'Corolla' and 'Accord'. If you want to change this behavior and make it look for the values starting with the entered value, i.e. 'Corolla' only, add the following code to the AfterAppInit:
$ajaxSearchStartsWith = true;
Unquote excerpt
quote

By default, search suggest results include all values in which the search phrase presents. If you want to be shown only those values that begin with the search phrase you should change the $suggestAllContent variable value in the include\appsettings.php file to false.

unquote
Sure, what you told earlier is NOT in conformity with what could be read in the manual, so, just lines for inspiration purposes only where to make wished changes resp. where to check what is currently on here on the Ajax auto-suggest issue.

90288 3/13/2017



https://xlinesoft.com/phprunner/docs/ajax_features.htm
The application will look for the occurrence of the typed in string anywhere in the list. For example, when you enter 'co', it will show 'Corolla' and 'Accord'. If you want to change this behavior and make it look for the values starting with the entered value, i.e. 'Corolla' only, add the following code to the AfterAppInit:
$ajaxSearchStartsWith = true;
Unquote excerpt
quote

By default, search suggest results include all values in which the search phrase presents. If you want to be shown only those values that begin with the search phrase you should change the $suggestAllContent variable value in the include\appsettings.php file to false.

unquote
Sure, what you told earlier is NOT in conformity with what could be read in the manual, so, just lines for inspiration purposes only where to make wished changes resp. where to check what is currently on here on the Ajax auto-suggest issue.



Thank you very much for your fast reply , I checked appsettings.php and found that $useAJAX = true;$suggestAllContent = true; and in my After Application Initialized there no Event , But it still search only for Start with. but in search box the it is working , it is not working only lookup wizard

HJB 3/13/2017



Thank you very much for your fast reply , I checked appsettings.php and found that $useAJAX = true;$suggestAllContent = true; and in my After Application Initialized there no Event , But it still search only for Start with. but in search box the it is working , it is not working only lookup wizard


So..., then you should give it a try to place "$ajaxSearchStartsContains = true" in the After Application Initialized event as this rules out the default Ajax configuration.