How can we apply initial_filter in inline editing for detail and list view

Hello Everyone,

I am trying to apply inital_filter for relate field for list and detail view.

This code is working fine only on edit view not on detail and list

'displayParams' => 
            array (
              'initial_filter' => '&user_kind_c_advanced=Employee',

How we can apply the same on detail and list view while inline editing.

Please guide.


It’s not easy. When you do inline editing called the function getEditFieldHTML from file include/InlineEditing/InlineEditing.php. There is variable $displayParams and the value is empty array. This function is called from controller.php of module Home. You can

  1. make custom function in file custom/include/InlineEditing/InlineEditing.php which will be have code from function getEditFieldHTML and modified array $displayParams with array initial_filter
  2. make children class for HomeController of file modules/Home/controller.php in file custom/modules/Home/controller.php
  3. include file custom/include/InlineEditing/InlineEditing.php in custom/modules/Home/controller.php
  4. override function the function action_getEditFieldHTML so that it call custom function from from point 1 this description.

Hi @p.konetskiy,

Thanks for the reply

I can see here function getEditFieldHTML($module, $fieldname, $aow_field, $view = ‘EditView’, $id = ‘’, $alt_type = ‘’, $currency_id = ‘’)

$view = ‘EditView’,

it will work for editview??

as i tried to override but i cant see any changes in detail or list view

If possible can you share code?

It works for all for form which call the function. It’s detailview and listview now. The parameter isn’t for current view form. It sets the edit form for the field.

I doesn’t have a code. I show way only.