Is there a way to have a field group be one column...
# suitebuilder
j
Is there a way to have a field group be one column AND span the entire page? It seems if I tell it to be one column it just is shoved to the left. I have some checkboxes with LOOOOOONG labels and it looks awful as-is.
message has been deleted
c
Hi, well it would react to the width of the body field. And that would then depend on user screen size as well how this will be presented.
body field display size:
j
In view mode, I'm unaware of a solution. But in a CS, you can use something like below. Your field path may change if you edit your form, however, so it's not the "best" solution but it'll get the job done when needed.
Copy code
function pageInit(context) {

        let dataRow = document.querySelector("#tr_fg_fieldGroup63 > td:nth-child(1)");
        
        dataRow.style.width = "100%";
    }
Ah, I got it. Put an inline HTML field on your form and add that same code block with the queryselector and width update. It's working on my end.
Here was my inline html field. Working like a charm. Again, if you move your field around, it may break your path but if that doesn't happen often, you may be good.
Copy code
<script>let dataRow = document.querySelector("#tr_fg_fieldGroup63 > td:nth-child(1)");
        
        dataRow.style.width = "100%";</script>
🎉 1
j
Copy code
jQuery('#fg_fieldGroup474').parent().closest('td').attr('colspan', 3);
👍🏻 1
seems to do the trick
it’s not a width thing, it’s a colspan thing
I just put the above into my client script that’s included via UE