Set Column LABEL and NAME to Different Values
-
- The Question
Is it no longer possible to have POD column LABEL and NAME not “match”? Are there default settings that address this that weren’t default in this manner before and I just need to flip a switch somewhere?
- The Set Up
- WordPress 6.0.1
- PODS Version 2.8.23
- Self-Hosted
- Only other plugin active at this time is Maintenance, Version 4.06 which is used just to give users a “maintenance” screen as the site is being constructed. I did deactivate it when I deactivated all other plugins and tried again, same behavior in the PODs, so I’ve reactivated this plugin again.
- I have reset and deactivated PODS, reactivated, and tried again. Same behavior.
- The Details
It has been a year-ish since I’ve done anything with PODS, but it used to be that when I added or edited a column in a POD I could set the LABEL to one value and the NAME to another.
My normal process was to add the full value to the LABEL, save the column, thus getting the full value for the NAME (with dashes for spaces), then remove the extraneous text from the LABEL value and save again.
e.g.
- Step 1: set Label = Lookup Area, Name (auto-generated) = lookup_area, Save, Name auto-magically becomes lookup-area
- Step 1: Update Label = Area, Save, no change to Name (lookup-area)
Now anytime I change the LABEL value and save, it updates the NAME value to “match”.
- The Use Case
This is undesirable for me as the pod name is extraneous in the column LABEL and just annoying for users to see when adding data, but I do need it in the column name that’s accessible via PHP so I can access the column name for manipulation of other things
e.g. in setting post title based on POD values.
` if ($postType === ‘lookups’)
{
$fields = array( ‘post_title’, ‘lookup-area’, ‘lookup-value’ );
}`
- The topic ‘Set Column LABEL and NAME to Different Values’ is closed to new replies.