Hi Peter
None of those things work as they stand – however they did give me an insight as to what is going on. I am not proficient enough in CSS or Javascript to determine the solution, but I’m hoping if I explain in detail you or someone can advise on the correct answer.
To recap we are trying to get multicolumn forms, but with the Show More/Less button functionality still working, initially hiding columns that have been ticked in the ‘Less’ column of the form template
In the normal case, such fields are marked with tr class of “row-show-less-more”. The CSS has ‘display:none’ for this, so the row is not displayed. When the Show More button is clicked, it executes jQuery(‘.row-show-less-more’).toggle() which introduces style=”display:table-row” to the tr element – revealing the missing rows. All as expected
In the multicolumm case, the principle is to introduce .wpda_simple_table tr CSS with a suitable width attribute and display:grid to get multiple tr into the same screen row
However this display:grid overrides the display:none of the row-show-less-more class and so you see all rows initially. If you click the Show More button, the toggle function still works and you get a style=”display:none” to hide the affected rows. But this means everything is backwards – rows are displayed initially and the Show More/Less button works the wrong way round.
Kevin