# List (from data source) - Conditionally hide fields in details popup

**URL:** <https://community.fliplet.com/t/list-from-data-source-conditionally-hide-fields-in-details-popup/678>\
**Category:** Get Help\
**Tags:** list-detail\
**Created:** [August 14, 2024, 9:18am UTC](https://community.fliplet.com/t/list-from-data-source-conditionally-hide-fields-in-details-popup/678 "2024-08-14T09:18:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyFromLeeds](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@AndyFromLeeds](https://community.fliplet.com/u/AndyFromLeeds)\
**Post date:** [August 14, 2024, 9:18am UTC](https://community.fliplet.com/t/list-from-data-source-conditionally-hide-fields-in-details-popup/678/1 "2024-08-14T09:18:24Z")

</div>

Hi,

I have a form that takes the user down one of two lines of questioning depending upon the answer selected in a dropdown list. In the form I can hide the fields that are not relevant.

I use the data source from the form to populate a list (from data source) widget. When the user clicks on one of the list items it brings up the details view popup but, as expected, it shows every single field that was available on the form, including the questions that the user did not answer.

Is it possible to conditionally hide fields in the details view popup? I have tried:

Fliplet.Hooks.on(‘flListDataAfterRenderList’, function(options){  
options.config.beforeShowDetails = function(opt) {  
var data = opt[‘data’][‘originalData’];  
var fieldUsedtoHideOrShowThings = data[‘SomeField’];

// but what now ??? …  
};  
});

but these events do not give me any way of manipulating what gets rendered as I only have access to the template html.

Am I on the right track? Is this possible?

Thanks  
Andy

---

<div class="post-metadata">

**Author:** ![Deb](https://dub1.discourse-cdn.com/flex017/user_avatar/community.fliplet.com/deb/32/159_2.png) [@Deb](https://community.fliplet.com/u/Deb)\
**Post date:** [August 14, 2024, 10:06am UTC](https://community.fliplet.com/t/list-from-data-source-conditionally-hide-fields-in-details-popup/678/2 "2024-08-14T10:06:23Z")

</div>

Hi Andy,

Yes this is possible. If you want to manipulate what data is shown in the detail view overlay for a List from data source widget you need to use this hook and setting. Inside this hook which fires when an entry is clicked you can see the entry that will be rendered and you can manipulate it here.

```auto
Fliplet.Hooks.on('flListDataBeforeGetData', function(options) {
  options.config.beforeOpen = function(data) {
    //e.g. delete the Location column from rendering
    delete data.entry.data.Location
  };
});

```

See docs: [List (from data source) | Fliplet Developers Documentation](https://developers.fliplet.com/API/components/list-from-data-source.html#beforeopen)

Hope this helps,  
Deb

---

<div class="post-metadata">

**Author:** ![AndyFromLeeds](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@AndyFromLeeds](https://community.fliplet.com/u/AndyFromLeeds)\
**Post date:** [August 14, 2024, 11:00am UTC](https://community.fliplet.com/t/list-from-data-source-conditionally-hide-fields-in-details-popup/678/3 "2024-08-14T11:00:06Z")

</div>

Perfect thanks
