• Hi

    Are you able to add shortcodes within the database

    For example I have a field called “Age” and i wish to display someone’s birthday using a shortcode like this ” [agecalc birthdate=”1978-01-30] ” ?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author xnau webdesign

    (@xnau)

    The only field that processes shortcodes is a rich text field. I’n not sure how well that will work in your case.

    In Participants Database, there are several ways to show someone’s age, given a date, they all require some amount of coding. Doing it in a custom template is perhaps the easiest way to go. The template calculates the age and fills in the value when it’s displayed.

    I created a single record template that demonstrates a way to do this:

    https://gist.github.com/xnau/4f19d08b7e240d81df2f1c5e2681b227

Viewing 1 replies (of 1 total)

The topic ‘Adding shortcodes to Text fields’ is closed to new replies.