• Resolved warrisr

    (@warrisr)


    I am using shortcodes to populate tables with numeric product specifications. I just discovered that TablePress includes formula functionality which would be very useful for things like converting imperial values returned by a shortcode to metric. Unfortunately, it appears that you cannot use a shortcode in a formula.

    But before I give up on the idea, I just wanted to confirm that there is not some way that shortcodes could be used in a formula. Here is what I tried and the error that I am getting:

    =[merge tag=length] * 2.54
    !ERROR! illegal character ‘[‘

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    For this, you can use the TablePress Extension from https://tablepress.org/extensions/shortcodes-before-formulas/ which will essentially reverse the execution order of formulas and Shortcodes.
    To use it, extend the Shortcode that you are using to display the table to

    [table id=123 shortcodes_before_formulas=true /]
    

    Regards,
    Tobias

    Thread Starter warrisr

    (@warrisr)

    Worked perfectly! That is going to save me a great deal of effort.

    Thanks!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcodes In Formulas’ is closed to new replies.