1

I have a template on a site being updated from EE 2.5.5 to EE 2.7.3 and during the update I've upgraded to the latest Field Pack 2.1.1.

My template includes use of a Field Pack - Checkboxes field and relies on the :all_options capability available in Field Pack 1.

Consequently it now fails because I belatedly see there is no mention of :all_options in the docs for Field Pack 2!

http://docs.pixelandtonic.com/fieldpack/fieldtypes/checkboxes/tags.html

I'm using my checkbox series to output a table so it's critical I can output something for each option regardless of whether it is selected or not.

For example, here's some of the code I had that was working before…

{grade_ff:all_options}
  {if '{selected}' == ""}<td class="{option_name}"></td>
  {if:else}<td class="{option_name} y">Yes</td>{/if}
{/grade_ff:all_options}

So unless I've missed something I now have to have a line of code for each of my options explicitly

<td class="foo{if '{grade_ff:selected option="foo"}'} y">Yes{if:else}">{/if}</td>
<td class="bar{if '{grade_ff:selected option="bar"}'} y">Yes{if:else}">{/if}</td>

Is that right?

2

The :all_options tag pair was actually removed removed two years ago, well before Field Pack 2.0 came out.

We removed it because EE doesn’t parse tags for fields that don’t have any data; it just removes them. And 99% of the time, people used the :all_options tag pair in cases where they would expect the options to appear regardless of whether a checkbox was checked or not, etc.. So it led to a lot of confusion when the options would randomly not appear for certain entries.

| improve this answer | |
  • OK, fair enough. I had no idea it had been removed so long :$ It was darned useful though for constructing a table where the output of an empty cell is as important as the output of a cell with content, where both derive from a set of attribute statuses. Not sure now how to achieve that as elegantly as I was doing :( – Jonathan Schofield Feb 14 '14 at 14:37
  • Though I have got my template working again using the explicit verbose approach cited above. – Jonathan Schofield Feb 14 '14 at 14:39
  • We might consider adding a plugin that would let you get them via {exp:fieldpack:all_options} or something. – Brandon Kelly Feb 19 '14 at 15:06
  • That would be nice :) – Jonathan Schofield Feb 21 '14 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.