Try this:
filter="strtotime(Available-From)>=strtotime($_POST(avail))"
https://cfdbplugin.com/?page_id=1195
Thread Starter
MikeKJ
(@mikekj)
Hi Michael,
Tried that with no result returned also tried
[cfdb-table form=”Initial Application” filter=”strtotime(Available-From)>=strtotime(/.*$_POST(avail).*/i)”]
<form action=”.” method=”POST”>
Date: <input type=”text” name=”avail” />(yyyy-mm-dd)
<input type=”submit” />
</form>
with again no return, the date entries in the database are in yyyy-mm-dd format and when entering a date in POST of 2017-04-01 I expect the data from an entry in the database with an Available-From date of 2017-04-03 to be returned. FYI this shortcode and form is in a page of a WP site.
Sorry to be a pain
Set the filter to exactly how I wrote it. Yours is different.
Thread Starter
MikeKJ
(@mikekj)
Sorry Michael, exactly as you wrote it
[cfdb-table form=”Initial Application” filter=”strtotime(Available-From)>=strtotime($_POST(avail))”]
no result returned from a POST date of 2017-04-01
Thread Starter
MikeKJ
(@mikekj)
Yaay got it to work like this
[insert_php]
if (isset($_POST[‘avail’])){
echo do_shortcode(‘[cfdb-table form=”Initial Application” filter=”strtotime(Available-From) >= strtotime($_POST(avail))”]’);
}
[/insert_php]
Thread Starter
MikeKJ
(@mikekj)
Great plugin and some great flexibility Michael, I do have a question though, why did you decide to use an array of arrays for cfdb instead of sql rows? Just curious.