SOLVED: Pods Checkbox Value Displays only 1 or 0

Bricks Version: 1.3.5/1.3.6
Browser: Brave 95
OS: macOS

Since Bricks 1.3.5 the checkbox field from Pods displays only 1 or 0 instead of the value (text) from the Yes/No Label field.

Hi @HeroRox,

thank you very much for the report. I took a quick look into the pods documentation:

The Yes / No field can store boolean-like values. If saved, it will only save a “0” or a “1” value to the database.

So the return value is always “0” (false = no) or “1” (true = yes) and this is not a bricks bug.

As far as I can see it is not possible to return the label as well (like with Advanced Custom Fields). To do something with the true or false values, you can use a PHP if/else statement and query what was selected, and output a string accordingly.

Best regards,
timmse

1 Like

Hi @timmse, thanks for checking this out! Until Bricks 1.3.4 Pods shows the label as entered, so I assumed that it came to the change by Bricks 1.3.5.
So I had to roll back to 1.3.4 again. :sob:

Hello @HeroRox & @timmse

Yes, I confirm Bricks 1.3.5 introduced this bug. We’ll have it fixed in the coming Bricks release (1.3.7).

Hi Luis, thanks for your reply. I’m happy to hear that. Btw: I have just found the error also with the field “Relationship, Simple (custom defined list)”.

1 Like

Is it possible that this bug has been reintroduced in one of the latest releases? I am using Bricks 1.6.2 and have some Pods custom fields of the type Relationship » Simple (custom defined list). When rendered using the dynamic data feature, the numeric value of the selected option is displayed instead of the option name.

Hi Martin,
Everything is fine with the checkboxes (which is what this report was about).

For the Relationship Field, however, I can confirm that the value and not the label is returned. I can’t say whether this was different before because I don’t use Pods regularly.

I’ve added it to the bug tracker :v:

2 Likes

Hi guys,
We’ve fixed this bug in Bricks 1.8.2, now available as a one-click update in your WordPress Dashboard.

Please let us know if you are still experiencing issues.

Best regards,
timmse

1 Like

Hi @timmse, the Pods the checkbox bug has been gone for a while - can’t remember when. Just tested with Bricks 1.8.2.1 and Pods 2.9.19. For the Relationship in Pods I don’t have in any project at the moment so can’t say anything about it (yet)…
Thanks to all