# |
Dec 18th 2019, 20:53 |
grzegorek.rafal |
I'm having some issues with creating modelless form. |
# |
Dec 18th 2019, 20:52 |
grzegorek.rafal |
hello |
# |
Dec 18th 2019, 15:30 |
Naino |
Alright I understand, thanks a lot! |
# |
Dec 18th 2019, 15:29 |
neon1024 |
https://github.com/cakephp/cakephp/blob/3.8.7/src/I18n/RelativeTimeFormatter.php#L314-L350 |
# |
Dec 18th 2019, 15:28 |
neon1024 |
As it looks to me like the helper has translations you’ll have to translate |
# |
Dec 18th 2019, 15:27 |
neon1024 |
Did you try `new FrozenTime('2020-01-01', 'Europe/Paris')` or similar? |
# |
Dec 18th 2019, 15:22 |
Naino |
Uploaded file: https://uploads.kiwiirc.com/files/eec209403bcd5379c4f3413283cee589/Capture%20d%E2%80%99e%CC%81cran%202019-12-18%20a%CC%80%2016.21.59.png |
# |
Dec 18th 2019, 15:22 |
Naino |
Uploaded file: https://uploads.kiwiirc.com/files/40995561f0c2cf4d800e930f619a4e8e/Capture%20d%E2%80%99e%CC%81cran%202019-12-18%20a%CC%80%2016.21.43.png |
# |
Dec 18th 2019, 15:16 |
neon1024 |
Looks like they take a translation to me |
# |
Dec 18th 2019, 15:15 |
Naino |
Hi, my application is configured with the locale fr_FR but these functions: date.diffForHumans() or date.timeAgoInWords() display dates in english only. How to change locale? Thanks. |
# |
Dec 18th 2019, 15:14 |
admad |
Check network tab to see if request is submitted |
# |
Dec 18th 2019, 15:11 |
kaliel |
@steinkel actually i have no error, just nothing happen |
# |
Dec 18th 2019, 15:09 |
jotpe |
@neon1024 thanks, it was a design issue and had to do with the primary key. |
# |
Dec 18th 2019, 15:06 |
steinkel |
I've just tested it and it works for me... any error you can see in screen? |
# |
Dec 18th 2019, 15:05 |
kaliel |
the green button "Login to proceed" dont work |
# |
Dec 18th 2019, 15:05 |
megan |
@kaliel could you send direct message me more details/screenshots of the problem you are experiencing? I will pass it onto the team to look into and fix |
# |
Dec 18th 2019, 15:02 |
kaliel |
@megan hi jorge, actually i can't join, the subscribe form is buged |
# |
Dec 18th 2019, 15:01 |
megan |
@kaliel it is! @steinkel runs it - its completely interactive, you are able to ask any questions you have as you go |
# |
Dec 18th 2019, 14:05 |
neon1024 |
@jotpe If you save an entity, which doesn’t have a primary key set |
# |
Dec 18th 2019, 13:45 |
kaliel |
i'm thinking to join the course "Getting started with CakePHP 4", but is that a live session ? |
# |
Dec 18th 2019, 13:21 |
pieceof |
check submit button is not type submit, force type button |
# |
Dec 18th 2019, 13:21 |
pieceof |
using js for post ? |
# |
Dec 18th 2019, 13:18 |
pieceof |
fast double click ? |
# |
Dec 18th 2019, 12:39 |
jotpe |
there's a redirect after saving |
# |
Dec 18th 2019, 12:39 |
jotpe |
yeah, but why should this happen? |
# |
Dec 18th 2019, 12:38 |
pieceof |
double posting? |
# |
Dec 18th 2019, 12:36 |
jotpe |
What could cause duplicate data in my db with different ids (added by add method with post data)? |
# |
Dec 18th 2019, 12:32 |
ashish_onmobile |
Hi |
# |
Dec 18th 2019, 12:11 |
neon1024 |
So your accessor method is available on the enitty |
# |
Dec 18th 2019, 12:11 |
neon1024 |
`'valueField' => function ($entity) { return $entity->get('full_name'); }` |
# |
Dec 18th 2019, 12:10 |
neon1024 |
You’ve passed the trainer entity into your callback |
# |
Dec 18th 2019, 12:03 |
gianmarxgagliardi |
also your solution works thanks a lot |
# |
Dec 18th 2019, 12:02 |
jotpe |
Yeah, but maybe you want to access the full name somewhere else in your app ;) |
# |
Dec 18th 2019, 12:01 |
gianmarxgagliardi |
`$trainersUnmated=$this->SeasonTrainers->Trainers->find('list',['keyField' => 'id',` `'valueField' =>function($trainer){` `return $trainer->cognome .' '. $trainer->nome;` `}])->notMatching('SeasonTrainers');` it's works |
# |
Dec 18th 2019, 12:00 |
jotpe |
`$trainersUnmated = $this->SeasonTrainers->Trainers->find('list', ['keyField' => 'id', 'valueField' => *$full_name*])->notMatching('SeasonTrainers');` |
# |
Dec 18th 2019, 12:00 |
jotpe |
With your Accessor (`_getFullName()`) in your Trainer Entity you can access the full name. The query `$trainersUnmated = $this->SeasonTrainers->Trainers->find('list', ['keyField' => 'id', 'valueField' => $trainer->full_name])->notMatching('SeasonTrainers');` must be changed |
# |
Dec 18th 2019, 11:59 |
gianmarxgagliardi |
the problem is to call the method written in the model of trainers in the seasons_trainers controller |
# |
Dec 18th 2019, 11:58 |
jotpe |
Your query is not correct. |
# |
Dec 18th 2019, 11:57 |
jotpe |
? |
# |
Dec 18th 2019, 11:56 |
gianmarxgagliardi |
```<?php $query = $articles->find('list', [ 'keyField' => 'id', 'valueField' => function ($article) { return $article->author->get('label'); } ]);``` develop internal function and concat from there |
# |
Dec 18th 2019, 11:55 |
gianmarxgagliardi |
I think it is better for me to start again from this function |