Forums

CFV5 CCV5 Select and paginator

simelas 18 Apr, 2017
Hi All,

issue with paginator ?:

CFV5, CCV5, Joomla 3,6

I have a Chronoform V5 with drop downs to filter a Chronoconnectvity V5.

( In herebelow questions Model and field are used as generic but in real site they have different names matching where necessary).


1/ Easy to connect by using fltr[Model][field] in CFV5 and Model.field in CCV5 filter box. The expected results are obtained and displayed by CCV5 form.

Navigating into the form page with PAGINATOR_NAV shows that filters are active and only the slected data appears.

Everything works fine as long as the database table cell contains only one element to filter e.g. "b" . If it contains a string of data such as "a,b,c,d,e" for example and the drop down ask for "b" , then nothing is found. This is expectable as the CCV5 query is asking to retrieve a single data into a string ( Debugger shows that the request in CCV5 is ... WHERE `Model`.`field` = 'b' .)....

Therefore :

2/ Applying : if ( \GCore\Libs\Request::data("field") ) { $this->data['fltr']['Model']['field LIKE'] = "%".\GCore\Libs\Request::data("field")."%"; } in CCV5 WHERE box model allows to filter correctly a value into a string of data e.g. to find "b" into "a,b,c,d,e" string. Debbuger shows the rigth query ... WHERE `Model`.`field` LIKE '%b%' . The expected results are obtained and displayed by CCV5 form.

BUT in that second case, when changing page with paginator nav the result of the filtering is lost as if filter are reset wwhen changing page with PAGINATOR_NAV. Additionnaly chronoform selected values are reset.



Question ?:

How to use LIKE %% when using fltr[Model][field] in CFV5 and Model.field in CCV5 filter box, or how to keep filters when using \GCore\Libs\Request::data("field") ) { $this->data['fltr']['Model']['field LIKE'] = "%".\GCore\Libs\Request::data("field")."%"; } in CCV5 WHERE box model ??????

simelas
Max_admin 21 Apr, 2017
Hi simelas,

I suggest that you install v6 beside v5 and try this, if you need more flexibility and control on the connection conditions and filtering..etc then v6 is the way to do it, v5 is limited in this part.

So for example, in v6 conditions box you could use:

Model.field/LIKE:%{data:url_param_name}%

to add a like to the conditions.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
simelas 21 Apr, 2017
Answer
1 Likes
Hi Max,

Thanks for the feed back and confirmation

Indeed i started exploring CCV6 . Amazing !

Keep the good work going on !

simelas
Max_admin 23 Apr, 2017
Hi simelas,

Glad you like it, let me know if you meet any obstacles!🙂

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.