# |
Dec 6th 2019, 15:46 |
ricksaccous |
yeah it is |
# |
Dec 6th 2019, 15:35 |
devito |
hello all, is it possable to add a composite key using a migration? i see the add index function accepts an array of id’s but i am assuming it will add the same type of index per column such as unique |
# |
Dec 6th 2019, 15:29 |
daniel.upshaw |
Has anyone ever trying using the concept of layouts, with View Cells? Like extending a base Cell Template |
# |
Dec 6th 2019, 14:57 |
ricksaccous |
at least that's where i tend to put that logic |
# |
Dec 6th 2019, 14:57 |
ricksaccous |
and setting it when you get the entity |
# |
Dec 6th 2019, 14:57 |
ricksaccous |
the only other pain is handling beforeMarshal |
# |
Dec 6th 2019, 14:57 |
ricksaccous |
i've recently just done that |
# |
Dec 6th 2019, 14:56 |
ricksaccous |
@challgren you can use that input mask jquery plugin |
# |
Dec 6th 2019, 14:13 |
admad |
> Its the dropdown for the dates throws them off they prefer to enter YYYY-mm-dd for example @challgren then can do so do with the html5 datetime inputs, which are default in cake 4 :slightly_smiling_face: |
# |
Dec 6th 2019, 13:00 |
neon1024 |
Oh I see |
# |
Dec 6th 2019, 13:00 |
challgren |
Its the dropdown for the dates throws them off they prefer to enter YYYY-mm-dd for example |
# |
Dec 6th 2019, 12:59 |
neon1024 |
I still think you can pass `'tabindex' => {n}` as a option |
# |
Dec 6th 2019, 12:58 |
challgren |
That is annoying honestly. My users are all old school dos guys and just like to tab through everything |
# |
Dec 6th 2019, 12:48 |
neon1024 |
Like the single date input which cropped up the other day |
# |
Dec 6th 2019, 12:47 |
neon1024 |
Perhaps there could be a plugin which contains a number of frequently requested form widgets already built |
# |
Dec 6th 2019, 12:46 |
neon1024 |
Often people talk about creating custom form widgets, but I haven’t looked into that |
# |
Dec 6th 2019, 12:46 |
neon1024 |
Yeah, I don’t like the string templates either |
# |
Dec 6th 2019, 12:46 |
val |
`echo $this->Form->control('title', ['templates' => ['inputContainer' => '{{content}}']]);` seems to work but it is so complex comparing to 2.x :( |
# |
Dec 6th 2019, 12:46 |
neon1024 |
I don’t know, sorry :( |
# |
Dec 6th 2019, 12:46 |
neon1024 |
So it is, well, in that case |
# |
Dec 6th 2019, 12:45 |
neon1024 |
Like `->radio()` or `checkbox()` |
# |
Dec 6th 2019, 12:45 |
neon1024 |
Perhaps it’s `->text()` but a specific type input method |
# |
Dec 6th 2019, 12:45 |
val |
`Form->input()` is deprecated and it uses `Form->control()` |
# |
Dec 6th 2019, 12:43 |
neon1024 |
I think the easier way is instead of using `->Form->control()` is to use `->Form->input()` or similar |
# |
Dec 6th 2019, 12:42 |
neon1024 |
Although note you’ll lose the wrapping css class and responsive error class |
# |
Dec 6th 2019, 12:42 |
neon1024 |
`$this->Form->setConfig('templates.inputContainer', '{{content}}')` |
# |
Dec 6th 2019, 12:42 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/View/Helper/FormHelper.php#L135 |
# |
Dec 6th 2019, 12:41 |
neon1024 |
It’s my understanding you have to edit the string templates in FormHelper |
# |
Dec 6th 2019, 12:37 |
val |
Hi, in 2.x we sometimes use `'div' => false,` in html form inputs. How to generate the input without `<div>` in 3.x? |
# |
Dec 6th 2019, 12:29 |
neon1024 |
https://book.cakephp.org/3/en/core-libraries/validation.html#allowing-empty-fields |
# |
Dec 6th 2019, 12:29 |
neon1024 |
..and no documentation on the callable method params |
# |
Dec 6th 2019, 12:26 |
neon1024 |
A great example of when an api doesn’t do what the code reads as it should be doing |
# |
Dec 6th 2019, 12:26 |
neon1024 |
:face_palm: |
# |
Dec 6th 2019, 12:26 |
neon1024 |
Ah, back to the idiotic allowEmpty*() ” ```with reversed * conditions instead.``` |
# |
Dec 6th 2019, 12:20 |
neon1024 |
Guess, I’ll have to pass extra data to hang the validation from, and process the messages manually :thinking_face: |
# |
Dec 6th 2019, 12:12 |
neon1024 |
I am unsure how I can spin these off into applying rules to the array values, such as `->hasContract('broadband')->hasExample('broadband')` etc |
# |
Dec 6th 2019, 12:11 |
slackebot2 |
<neon1024> |
# |
Dec 6th 2019, 12:11 |
neon1024 |
So far I have it wrapped into a single method which farms out validation to abstracted methods, but it means I have one generic validation message for a whole range of validation issues which isn’t great for UX |
# |
Dec 6th 2019, 12:10 |
neon1024 |
..and in other news, I have a field which submits an array, can I validate each array item in it’s own validation method? |
# |
Dec 6th 2019, 12:08 |
slackebot2 |
<neon1024> |
# |
Dec 6th 2019, 12:08 |
neon1024 |
Anyone else seeing PHP Storm run code inspection for Vue.js on their ctp files? |