• Resolved jtem

    (@jtem)


    Hi Michael,
    First of all, congratulations for you plugin, it is really great!
    I am using this shortcode:
    [cfdb-table form=”Introducir presupuesto” filter=”ex_field4=$user_login”]
    But i founded some problems because the variables are case sensitive, and the filter doesn´t work as i want. I would need to introduce something to disable case sensivity, like in this other expression (/i):
    [cfdb-table form=”Introducir presupuesto” filter=”ex_field4~~/$user_login/i”]
    But at the same time i would need the total coincidence of characters.
    What can I do?
    Thank you very much!
    Jtem.

    http://ww.wp.xz.cn/extend/plugins/contact-form-7-to-database-extension/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jtem

    (@jtem)

    Hi again!
    I founded in “preg_match” the use of /b in order to get a word boundary, so I have tried to change the shortcode in this way:
    [cfdb-table form=”Introducir presupuesto” filter=”ex_field4~~/\b$user_login\b/i”]
    But this doesn´t run.
    I need that ex_field4=b$user_login and also that the variable b$user_login doesn´t have case sensivity.
    Must I have to write my own shortcode or is there any other way to do it?
    Thanks everyone in advance!
    Jtem.

    Thread Starter jtem

    (@jtem)

    Hi!
    I got it!
    I have introduced strtoupper in CF7FilterParser.php
    case ‘==’:
    $retVal = strtoupper($left) == strtoupper($right);
    break;
    and used
    [cfdb-table form=”Introducir presupuesto” filter=”ex_field4==$user_login”]
    I will donate for your plugin, but you didn´t helped me!!
    Jtem.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Filter with variables (case sensitive)’ is closed to new replies.