# |
Dec 18th 2019, 21:22 |
grzegorek.rafal |
I see. |
# |
Dec 18th 2019, 21:21 |
challgren |
If you want the name_id to be hidden you would use `$this->Form->hidden('name_id')` instead of control |
# |
Dec 18th 2019, 21:19 |
grzegorek.rafal |
Of course |
# |
Dec 18th 2019, 21:19 |
challgren |
First are you extending Cake\Form\Form? |
# |
Dec 18th 2019, 21:18 |
challgren |
No |
# |
Dec 18th 2019, 21:17 |
grzegorek.rafal |
Right - so "name_id" would be "boolean" in _buildSchema() and then I should mark this controll as "hidden" in template? |
# |
Dec 18th 2019, 21:16 |
grzegorek.rafal |
:thinking_face: |
# |
Dec 18th 2019, 21:14 |
admad |
Raph: schema types != html type |
# |
Dec 18th 2019, 20:55 |
grzegorek.rafal |
Any ideas? |
# |
Dec 18th 2019, 20:55 |
grzegorek.rafal |
The problem is that 'name_id" control is being displayed as select, while it should be hidden. |
# |
Dec 18th 2019, 20:54 |
grzegorek.rafal |
```<?php echo $this->Form->create($form); echo $this->Form->control('name_id'); echo $this->Form->control('name2_id', ['options' => $featurePackagesList, 'empty' => '(choose one)']); echo $this->Form->button('Save'); echo $this->Form->end(); ?>``` |
# |
Dec 18th 2019, 20:54 |
grzegorek.rafal |
Then in template |
# |
Dec 18th 2019, 20:53 |
grzegorek.rafal |
```protected function _buildSchema(Schema $schema): Schema { //phpcs:enable return $schema ->addField('name_id', 'hidden') ->addField('name2_id', ['type' => 'select']); }``` |
# |
Dec 18th 2019, 20:53 |
grzegorek.rafal |
In form class I have |
# |
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)? |