php - Joomla form variable handling -


i have situation need create shortcut specific filter in joomla component.

the problem cannot unset it, not know if joomla sets form fields own session handler, request handler or kind of custom handler. there not appear documentation on specific case.

the full situation have link auto filter in same view link (in components sidebar). 1 view specific filter , other standard. need when click filtered view reset current filters make sure displays should, , vice-versa clicking again reset filters.

i have tried number of approaches this, , although can consistently force filter not reset form when re-enter last page technique have tried far , of course want avoid bypassing joomla's default functions.

if(jrequest::getvar('filter_group_id',false)==10){     jrequest::setvar('last_filter',true);     ethicstoolhelper::addsubmenu('supervisors'); }else{     if(jrequest::getvar('last_filter',false)===true){         jrequest::setvar('last_filter',false);         jrequest::setvar('filter_group_id',false)     }     ethicstoolhelper::addsubmenu('users'); } 

this recent think have tried, can see try reset value false in hope joomla read not being set, jrequest has no built in unset method.

i don't have enough rep comment yet, i'm guessing bit problem be. assuming using model set state of filters, can @ overriding populatestate method.

another options fiddle context property in model. example, change context if have special filters enabled if using things $app->getuserstatefromrequest(). if can post bit more information design of component (controllers , models), can more.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -