Change style of multiple file fields

Hi
Is it possible to change the style Flex direction dynamically on multiple file fields?

Perhaps this would help: Break lines of multi-file listing

The solution in the suggested post, which was posted by me, allowed to list the file names in column.
However for images it is best to display the thumbnails in line as usual.
In the project the same table can display doc files. PDF and photos.
I would like to change the direction dynamically.
I made a few unsuccessful attempts with the CellAttrs[“style”] property.

elio42 wrote:

I made a few unsuccessful attempts with the CellAttrs[“style”] property.

You may post your code for more discussion.

To put all elements in line, generated HTML contains:

<span>
<div class="flex-row ew-images">
<a target="_blank" title=" Click for ..." data-rel="document_x2_nmMultiFile" class="ew-lightbox cboxElement" href=" ...

Wrongly, Chrome is displaying in a column.To dynamically change the layout I used a script client at listpage startup.

// Startup script
// Write your table-specific startup script here, no need to add script tags.
var opcao=<?php echo "1";?>;
if (opcao==1){
    $(".d-flex").removeClass("d-flex");
}

elio42 wrote:

$(“.d-flex”).removeClass(“d-flex”);

You better use a more specific CSS selector, otherwise above line will affect all other elements with class “d-flex” which is a general class from Bootstrap.

Your suggestion is welcome. I’m not an expert in CSS and Jquery.

See View and change CSS.

elio42 wrote:

Your suggestion is welcome. I’m not an expert in CSS and Jquery.

See step #5 from How to rename multiple files and displayed it vertically (v2022); that is one of the example how to use a more specific CSS selector.