Tell us what you are trying to do?
I have a list of values from a large field of checkboxes in a form. I store whatever the user checks as a repeating field for each question that they're asked to answer. When I display the results, it shows the fields in the order that the user checked them based on their position in the form. I'm applying CSS to colorize the results and would like to group them, which I think I can accommodate using an ASC sort order. I've added a letter at the beginning of each skill so I can at least group them, thereby simulating grouping the colors together.
Is there a way that this can be done?
Hi, the Types checkboxes field shortcode doesn't provide any options for specifying a custom sort order, so you're limited to the order of the checkbox options in the Custom Field Group editor. If you'd like to customize this field output, it would require custom code that falls outside the scope of support we provide here. We have a contractors portal available where you can connect with skilled independent developers who may be able to provide professional assistance: https://toolset.com/contractors
Thanks for the reply, Christian. I'm actually not using the checkbox field as far as Toolset goes. I'm using this in conjunction with GravityForms and am relaying the value assigned to the checkbox (which is really a custom field placeholder in GF) and passing the value to a repeating single line text field as far as the custom field goes. Does that make a difference?
Unfortunately no, there's not a good way to apply a custom order to the output of repeating fields in the current software regardless of field type. It would require custom code that falls outside the scope of support we provide here in the forums.
I see. Sorry to be redundant - just want to be super clear. I don't think I'm asking for custom ordering per se. All I want to achieve is if there are say 5 instances of a repeating field called 'color' with values of green, blue, red, yellow, and orange that they could be sorted/displayed in alphabetical order upon rendering rather than the numerical ID ordering they were originally saved in. You're saying that can't be done. Is that correct? Thanks in advance, Christian.
You are correct, it is not possible to sort the displayed values in any order other than the order in which the options are defined in the Custom Field Group editor screen. You can reorder the options as desired in the Custom Field Group editor, but any other display order modification requires custom code.