Skip Navigation

[Résolu] Price field setup with alternative option

This support ticket is created Il y a 6 années et 1 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Waqar Il y a 6 années et 1 mois.

Assisté par: Waqar.

Auteur
Publications
#1134385

J S

On the classifieds site example, is there a way to create a Price field that is required in a numeric format when listing, but allow users to select "TBD" or "Not Specified" as an alternative to entering a numeric value? How would we set this up in both the Types fields and the associated CRED form? It should also work when a user is editing a listing, so they can revert to either "TBD" or "Not Specified" after having selected a numeric value previously

#1134970

Hi there,

Thank you for contacting us and I'll be happy to assist.

The non-numeric values like "TBD" or "Not Specified" can't be added to a numeric price field, but you can add two new custom fields to allow admin/visitors to specify that the price information is not available.

1. You'll first add a new custom field "Price unavailable?" to your listings custom post type and set it to use "Checkbox" type.

2. Next, you'll add another custom field "Price Status" and set it to use select field type, with two options: "TBD" & "Not Specified".

3. After that, you can set this "Price Status" field to only show when "Price unavailable?" checkbox is checked.
( ref: https://toolset.com/documentation/user-guides/types-custom-fields-conditional-display/ )

4. Likewise, the numeric Price field, can be set to only show when "Price unavailable?" checkbox is unchecked.

Note: this conditional display will automatically carry forward to your front-end CRED forms too.

regards,
Waqar