• I have this shortcode,

    [pdb_list fields="strategy, symbol, date_entered, entry_price, adjustments" filter='symbol=s&p*&exit_price=']

    I have values in the symbols field like SPX1, SPX2, SPX3 etc., and this same filter shortcode is working fine when I filter for these other symbols. The problem is that since the S&P# value has a & in it the plugin recognizes that as an attempt to chain filters, causing it not to display.

    Is there any way to escape the filter string? I have tried different forms of quotes and backslashes to try and I would like this to be doable without having to have clients have to adopt and spend time and money changing things to SNP# or something.

    https://www.ads-software.com/plugins/participants-database/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Malachi Healey

    (@malachi-healey)

    I didn’t find a way to escape string but I did find an adequate work around by filtering out what I didn’t need instead of what I needed.

    For those concerned

    [pdb_list fields="strategy, symbol, date_entered, entry_price, adjustments" filter='symbol!spx*&symbol!stock*&symbol!WHATEVERIWANT&exit_price=']

    Plugin Author xnau webdesign

    (@xnau)

    Thanks for pointing this out. Actually, the ampersand shouldn’t be allowed in a field name, an oversight on my part. That wouldn’t affect your frontend, the title of a field can be any string you want to use, and that’s the only thing anybody ever sees.

    If you hadn’t solved it yourself, I would have suggested changing the name of the field. This wouldn’t have changed anything for your customers, the name is only used internally. If you do want to change the name, you have to edit it in the database directly in the two places it’s used: the fields table and as a column name in the main database table.

    Plugin Author xnau webdesign

    (@xnau)

    On second thought…ampersands already aren’t allowed in field names…so are you sure the real name of the field is ‘s&p’? It’s probably ‘sandp’ take a look on the manage database fields page and see what the name (not title) of your field is.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Escaping characters for list display filter?’ is closed to new replies.