• Hello. When I use the && operator the shortcode cfdb-value doesn’t work:

    For example, the following shortcode will work ok:

    [cfdb-value form="Demostraciones" show="Salario" role="Anyone" permissionmsg="false" filter="Fecha>=$_POST(FechaInicio)" function="sum"]

    But the following shortcode will not work, it will return the whole string as if it wasn’t a shortcode:

    [cfdb-value form="Demostraciones" show="Salario" role="Anyone" permissionmsg="false" filter="Fecha>=$_POST(FechaInicio)&&Fecha<=$_POST(FechaFin)" function="sum"]

    https://wordpress.org/plugins/contact-form-7-to-database-extension/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Does it work with just filter="Fecha<=$_POST(FechaFin)" ?

    If that clause is returning false, then the rest of the filter returns false because of the &&

    Thread Starter gabriel.gonzalez

    (@gabrielgonzalez)

    Thank you a lot for your prompt response.

    The code you write indeed returns an error (false). I supose that means that I am doing something wrong, but I still don’t know what, I’m sorry for taking your time. For exaple, I don’t know why the first one of the following codes returns a correct value, but the second one returns an error, if I’m just replacing < for >, shouldn’t the second code return al least 0?

    1) filter="Fecha>=$_POST(FechaFin)"

    2) filter="Fecha<=$_POST(FechaFin)"

    Plugin Author Michael Simpson

    (@msimpson)

    Clearly if you are checking that a value is both >= and <= then it will only return true if Fecha == FechaFin. I’m not sure if that is helpful.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘&& Operator with cfdb-value returns "error"’ is closed to new replies.