Sauter la navigation

[Résolu] Accessing the « display text » of a Select field

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 5 années et 6 mois. 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)

Marqué : 

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par alexG-4 Il y a 5 années et 6 mois.

Assisté par: Shane.

Auteur
Publications
#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

Les langues: Anglais (English )

Fuseau horaire: 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

lien caché

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

Les langues: Anglais (English )

Fuseau horaire: 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