Support

Account

Home Forums General Issues Issues with for loop when switching from radio to checkbox Reply To: Issues with for loop when switching from radio to checkbox

  • The old field returned a single value (string). Any posts that have not been updated will continue to return a single value. A radio field can only have one value.

    Any post updated or added after the change will return an array of values. A checkbox field can hold multiple values.

    You will need to check for both conditions and something different for each. Either that or you will need to edit every existing post to update the field so that it will always return an array.

    I haven’t got a clue how to incorporate any of this into twig because I don’t use it.