Pods repeatable fields – break row as separator?
-
Repeatable fields are separated with a comma, how can I separate them by <br>?
-
That’s the first place I looked. Settings only allow a comma and custom separator. I tried using <br> or br in custom separator, but no go….
Ah right, it doesn’t support HTML.
Not sure where you are using the fields but you could create an each loop in the Pods template:
[each field]{@title}<br>[/each]Cheers, Jory
Umm, what exactly would [each field] be in real life example?
I’m using it inside bricks Builder, in Query Loop.
Hi @redbricks
Ah you’re using a page builder.
You could then create your own function for parsing the field data.
function your_function_name( $value ) { // Your code to display the field. return $value; }You can then reference this function within the magic tag:
{@yourfieldname,your_function_name}(note the comma separation).Cheers, Jory
Tank you for trying to help, but thiat just made it way too complex for me.
What exactly would do function do?
And where does the magic tag go – I presume there where I want to display it?
I’m sorry to say that it will require you to become a bit familiar with PHP to solve your issue.
Since you use a page builder your are limited to the integration of this page builder, which I understand isn’t integrated with Pods.
How are you displaying the current field exactly? Please share your code!
Cheers, Jory
-
This reply was modified 3 years, 1 month ago by
Jory Hogeveen.
Bricks builder allows me to just pull in the fields I want, no coding whatsoever. Unfortunately, in the case of repeaters it pulls them in the way Pods has them setup.
But TBH it seems a bit ridiculous Pods only anticipated them to be displayed separated by a comma.
Hi @redbricks
Pods itself allows several options. You can even define your own output separation in the field advanced options. You can even create each loops within Pods templates or go full-on PHP mode to fully define your own output.
But, when you pull the single metafield like you do now with a page builder there isn’t much more configuration you can do since you rely on the parameters the Bricks builder allows you to set. This is a limitation of a page builder, not Pods.
Cheers, Jory
Well, so-so. If Pods could output repeaters per line (without coding), I’d be happy with that and could use it in Bricks.
Hi @redbricks
Check this PR I’ve made: https://github.com/pods-framework/pods/pull/7045
Let me know if this works for you!
You can download the patch version at: https://github.com/pods-framework/pods/archive/refs/heads/feature/7044-extra-repeatable-formats.zipCheers, Jory
Thanks. Sorry for the late reply, never even saw that one.
If anyone’s interestedd, here’s a plugin that can help:
-
This reply was modified 3 years, 1 month ago by
The topic ‘Pods repeatable fields – break row as separator?’ is closed to new replies.