Trim last comma from view repeater value list

By: Jane Onorati | Asked: 10/05/2024
ForumsCategory: General questionsTrim last comma from view repeater value list
Jane OnoratiJane Onorati asked 5 hours ago
I have a view that I'm using to send a custom PDF of field values for an entry after it is created.  In the view, I list the values entered into a repeater on the form as a comma-delimited list.  So I'm using a foreach shortcode to do this: [foreach jtzzi] [lk1lx] [8k0i0] ([ggkx6]), [/foreach] How can I trim the last comma? -Jane
1 Answers
Jane OnoratiJane Onorati answered 5 hours ago

Well, never mind!  I just figured it out by experimenting with sep=", ":
[foreach jtzzi sep=", "] [lk1lx] [8k0i0] ([ggkx6])[/foreach]

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right