Hi Max, hi all,
Read Data action.
in previous chronoforms/chroconnectivity versions, when using several filters, empty parameter could be ignored in the SQL WHERE statement by using field_name = {data:parameter}/- .
In CF8 the syntax is field_name = {data.quote:parameter}. How do you achieve the same result as previous CF/CC with CF8 ( ignore empty parameter in SQL WHERE statement ) ? Using field_name = {data.quote:parameter}/- give an error.
best,
Hi simelas
This is not supported in v8, but I have added support for PHP in WHERE statement and SQL behaviors, so that you can use something like this:
id = 1 <?php if(!empty($this->data("fieldname"))): ?> OR column = {data:fieldname} <?php endif; ?>
However, you need to get the new update for this to work, I'm trying to have it ready this weekend, or do you prefer a quick patch for this fix only ?
Hi Max,
Thanks fro the info. Yes please a quick patch would be welcome.
another question then : will the php where accept also -- return [ ["field_1", 1, "="], ["field_2", 2, "!="] ]; -- as in in CF7 ?
S.
Hi simelas
Please update the new v8.0.24 update, it has this fix
And the v7 conditions are not supported in v8, you can use your own SQL in v8 so the old way is not needed