Check for array condition in server connect

I have this join condition in a server connect:

{{ $_POST.employement_adls.join(', ') }}

employment_adls is from a check box group

Capture

if the value is empty it works, and if there are more than one selection it works. How do I format it so that if it has 2 or more values to join them, but if only 1 value to not use the join condition?

If I only have one selection I get a ‘Join formatter expects an array’ error.

It took me 3 or 4 reads of this topic to understand the issue.

And the issue is, $_POST.employement_adls is being submitted/parsed as a string when it's a single value, and as an array when it has multiple values.

I would consider this a bug, it should've been an array always, but fixing it could break other websites people already made, so...

With the context above given, I'll let someone else help you find a solution

your summation is correct…

What is the code for these checkboxes on the page?

<div class="form-group mb-3" id="employement_adls_group" is="dmx-checkbox-group">
                    <legend class="col-sm-4 col-form-label"><strong>4. Current Employment ADLs</strong></legend>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="walking" id="employement_adls_1" name="employement_adls">
                        <label class="form-check-label" for="employement_adls_1">Walking</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="lifting" id="employement_adls_2" name="employement_adls">
                        <label class="form-check-label" for="employement_adls_2">Lifting</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="driving" id="employement_adls_3" name="employement_adls">
                        <label class="form-check-label" for="employement_adls_3">Driving</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="stairs, ladders" id="employement_adls_4" name="employement_adls">
                        <label class="form-check-label" for="employement_adls_4">Stairs, Ladders</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="construction" id="employement_adls_5" name="employement_adls">
                        <label class="form-check-label" for="employement_adls_5">Construction</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="other" id="employement_adls_6" name="employement_adls">
                        <label class="form-check-label" for="employement_adls_6">Other</label>
                    </div>
                </div>

Change the names of the checkboxes to name="employement_adls[]"

@Teodor you da man! That did the trick. So does that just say that the data is coming in as an array, and to treat it that way in server connect?