Navigation überspringen

[Gelöst] Accessing the „display text“ of a Select field

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

The issue here is that the user wanted to display the "display text" of their select field.

Solution:

Unfortunately no this is not possible to do.

This support ticket is created vor 5 Jahren, 5 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von alexG-4 vor 5 Jahren, 5 Monaten.

Assistiert von: Shane.

Author
Artikel
#1283479

I've hunted around the documentation but not been able to find an answer to this.

I have a "Select" field where the Display text and the Custom field content are different.

Is there a way to extract the Display text in php?

Thanks

Alex

#1283541

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Alex,

Thank you for getting in touch.

Could you send me a screenshot of exactly what you mean ?

Thanks,
Shane

#1283915

Hi Shane

Here's the screenshot

versteckter Link

The drop-down in the form shows the values Single, Recurring etc.
What gets stored in the database is the values SNGL, RECR etc. - which is what I want.

However, there are circumstances where I want to extract the Display value rather than what's in database.

Is that possible?

I know there are ways round this, but I'm hoping I don't need to do that!

Thanks

Alex

#1284093

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Alex,

I checked on this for you.

Unfortunately no this isn't possible to do. I remember it being possible sometime in the past but it seems our development team has removed this .

Thanks,
Shane

#1284121

That's a shame.

Thanks for checking / confirming, Shane.

Alex