Sauter la navigation

[Résolu] Calculated fields

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

Problem:
Calculated fields

Solution:
The best way is to write the custom shortcodes as per your need of calculation.

Relevant Documentation:
https://toolset.com/documentation/customizing-sites-using-php/updating-types-fields-using-php/

This support ticket is created Il y a 6 années et 2 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

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

Dernière mise à jour par nicolaS-3 Il y a 6 années et 2 mois.

Assisté par: Minesh.

Auteur
Publications
#1169469

Hi,
is there any tutorial explaining how to create calculated fields ? for example, I need a field "subscription expire date" = today (registration date) + 365. I might need other similar fields in the future (set values like A=100 or Y=A+B, etc.). What's the best approach to get this ?
Thanks
Regards
Nicola

#1169686

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - the best way is to write the custom shortcodes as per your needs.

We do not have exact Docs but I will share here which is available for now that may give you the idea:
=> https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/
=> https://toolset.com/documentation/adding-custom-code/how-to-use-toolset-api-hooks-in-custom-code/
=> https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/

As I understand you want to apply some calculations once the post is saved from backend (admin). If this is true, you need to use the standard save_post action.

More info:
=> https://toolset.com/documentation/customizing-sites-using-php/updating-types-fields-using-php/

#1169737

My issue is resolved now. Thank you!