add choosen in pages and add select by id and grid if exists in params of plugin function