# |
Nov 23rd 2017, 11:29 |
neon1024 |
`$this->Form->control('date.date', ['type' => 'date']);` right? |
# |
Nov 23rd 2017, 11:29 |
neon1024 |
To me that’s bad form input naming |
# |
Nov 23rd 2017, 11:27 |
birdy247 |
File uploaded https://cakesf.slack.com/files/U0T295QA3/F85HL6Q1L/-.php / https://slack-files.com/T053DPNCM-F85HL6Q1L-5cbd0fcd38 |
# |
Nov 23rd 2017, 11:25 |
birdy247 |
but when i check the request getData its like [data[date]] = '01/01/2017' |
# |
Nov 23rd 2017, 11:25 |
birdy247 |
I am trying to post date[date] = '01/01/2017' |
# |
Nov 23rd 2017, 11:25 |
neon1024 |
Or just just a plain old `if ($this->request->is('post')) { Log::debug('Holy salmon fingers Batman!'); }` |
# |
Nov 23rd 2017, 11:25 |
birdy247 |
My problem is this |
# |
Nov 23rd 2017, 11:24 |
neon1024 |
Perhaps try a beforeSave or something |
# |
Nov 23rd 2017, 11:23 |
birdy247 |
ah, I see |
# |
Nov 23rd 2017, 11:21 |
neon1024 |
Because it’s already happened by the time your controller action is executed |
# |
Nov 23rd 2017, 11:20 |
neon1024 |
So you’ll never be able to catch it in a controller action |
# |
Nov 23rd 2017, 11:20 |
birdy247 |
Crud.beforeFilter |
# |
Nov 23rd 2017, 11:20 |
birdy247 |
So its |
# |
Nov 23rd 2017, 11:20 |
neon1024 |
`thus is fired in the same cycle as all Controller::beforeFilter events.` |
# |
Nov 23rd 2017, 11:20 |
neon1024 |
Read the docs you linked @birdy247 |
# |
Nov 23rd 2017, 11:14 |
acosonic |
is there some webmail client like rainloop, written in cakephp ? |
# |
Nov 23rd 2017, 11:11 |
dereuromark |
Maybe you have some custom widgets and database types in place? |
# |
Nov 23rd 2017, 11:11 |
dereuromark |
@lorenzo Do we have a proper solution around datetime inputs yet and timezone awareness, as well as dropdown vs input support? I am fighting here with this for months, and there is no real good solution yet. |
# |
Nov 23rd 2017, 11:09 |
birdy247 |
I wasnt sure how else the marshaler would get it |
# |
Nov 23rd 2017, 11:09 |
birdy247 |
just make it date.timezone ad date.date ? |
# |
Nov 23rd 2017, 11:08 |
lorenzo |
it does not have to be in a hidden input field, though |
# |
Nov 23rd 2017, 11:07 |
birdy247 |
@lorenzo I suppose its not, but it relies on a hidden attribute and make validation a little harder |
# |
Nov 23rd 2017, 11:06 |
birdy247 |
@admad http://crud.readthedocs.io/en/latest/actions/add.html#events |
# |
Nov 23rd 2017, 11:03 |
bernat |
Hi. Are Query objects reusable? I mean, can I change the query after executing it and execute it again? |
# |
Nov 23rd 2017, 10:55 |
lorenzo |
why is it clunky? |
# |
Nov 23rd 2017, 10:55 |
admad |
Crud events are different from core events |
# |
Nov 23rd 2017, 10:54 |
admad |
Because crud doesn't have any beforeFilter event. |
# |
Nov 23rd 2017, 10:22 |
birdy247 |
any ideas? |
# |
Nov 23rd 2017, 10:20 |
birdy247 |
If I die() just before it, it does die |
# |
Nov 23rd 2017, 10:20 |
birdy247 |
it never logs anything |
# |
Nov 23rd 2017, 10:20 |
birdy247 |
File uploaded https://cakesf.slack.com/files/U0T295QA3/F84JDG61Z/-.php / https://slack-files.com/T053DPNCM-F84JDG61Z-b64854d31c |
# |
Nov 23rd 2017, 10:19 |
birdy247 |
I am using the CRUD plugin for an API |
# |
Nov 23rd 2017, 10:01 |
birdy247 |
but seems a bit clunky |
# |
Nov 23rd 2017, 10:01 |
birdy247 |
this works |
# |
Nov 23rd 2017, 10:01 |
birdy247 |
then in my custom datatype, it has both values |
# |
Nov 23rd 2017, 10:01 |
birdy247 |
and passed in date[datetime] = "01/01/2017 10:00" date[timezone] = "Europe/London" |
# |
Nov 23rd 2017, 10:00 |
birdy247 |
I did create a new datatype |
# |
Nov 23rd 2017, 10:00 |
birdy247 |
Has anyone got any nifty ideas on allowing users to enter a datetime and also a timezone |
# |
Nov 23rd 2017, 09:07 |
chan |
finally, 404 not found page, well done! :slightly_smiling_face: thank all. |
# |
Nov 23rd 2017, 08:33 |
birdy247 |
Morning |
# |
Nov 23rd 2017, 08:31 |
d-fens |
is it currently not possible to have routes that any anonymous user can access when activating the cakedc/users plugin as 'bypassAuth' => true doesn't work? |