[Resolved] Why not include a Dropdown filed in Pods?
It is, add a new field to your pod, set the type to relationship, and choose the Custom Simple option. You can define a custom list of items there, or use the more advanced relationships by choosing from a wide variety of object types in WordPress.
Thank you so much for quick response Scott.
That is what I need.
As an extension to the above question:
When creating a Simple (Custom Defined List) option, how would you separate the options to put each on a new line?
I’ve tried comma separation, semi-colon, even \n.
Have I missed one?
You hit enter/return on your keyboard, that will add a new line.
Here’s an example of the formats —
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
or key/value pairs like:
sun|Sunday mon|Monday tues|Tuesday wed|Wednesday thurs|Thursday fri|Friday sat|Saturday
Thanks for the reply.
I’ve tried that already, when we click the dropdown, the fields are all located in one long line, separated by “n”.
I enter the following list, as displayed:
Baptist World Aid Australia
Food for the Hungry
TEAR Fund NZ
World Concern US
World Relief Canada
World Relief US
When I save it & try to create a comment, The option ends up like this:
Baptist World Aid AustralianCEDAR FundnFood for the HungrynIntegranMAP InternationalnMission AlliancenMission EastnSELnTear AustralianTear NetherlandsnTEAR Fund NZnTearfund BelgiumnTearFund SwitzerlandnTearfund UKnWorld Concern USnWorld Relief CanadanWorld Relief USnWorld RenewnIntegral SecretariatnMedair
I tried the key|value trick, but ended up just getting:
“Baptist World Aid AustralianCEDAR Fund”
On the drop-down as an option.
Which version of WordPress / Pods are you running that you’re experiencing this?
We’re running WordPress 3.5 & Pods 2.2 at the moment.
No plans to update WordPress for the forseeable.
This may have been a bug with that version of Pods, there is no other solution than to upgrade Pods at the very least, to Pods 2.3.8.
I can assist you in the upgrade process in case you have any issues, if there are issues, there’s a bug I’ll need to fix anyways so I’m on the hook for that.
As always, be sure to backup your files and database before any upgrade to be safe.
I upgraded to WordPress 3.6 (also using pods 2.3.8) and I am now getting the same problem as Matthew. The relationship, custom defined, now adds “n” in between each field instead of keeping it in a return.
Probably shouldn’t have updated wordpress yet.
Any ideas on what I could do to quick fix it?
I actually just found where it explodes the fields out with /n and changed it to a comma for the time being and it seems to work. Although I know it’s just a temporary fix.
I’m testing on my new environment and it appears I can recreate the bug, so I’m looking into it deeper right now.
Thank you, I also just found that while editing a Template (from components) it add’s rn between each return. It’s like stripping out the invisible returns in the database.
We’re on the case on that one as well, thanks for the reports!
What version of PHP are you all running?
- The topic ‘[Resolved] Why not include a Dropdown filed in Pods?’ is closed to new replies.