# |
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? |
# |
Dec 6th 2019, 12:03 |
neon1024 |
There is the example application, but it would need upgrading to 4.x |
# |
Dec 6th 2019, 12:02 |
admad |
i'll need your help testing it whenever i reach that point |
# |
Dec 6th 2019, 12:00 |
admad |
np. been a while i used the plugin myself hence i am a bit rusty about the details, so updating for cake 4 is slow progress :P |
# |
Dec 6th 2019, 11:57 |
neon1024 |
Apologies that I never got around to implementing the last features of 2.0 |
# |
Dec 6th 2019, 11:57 |
admad |
though so :slightly_smiling_face: working on cake4 compatible branch of webservice |
# |
Dec 6th 2019, 11:55 |
neon1024 |
Or at least, the ones I’ve worked on are read-only |
# |
Dec 6th 2019, 11:55 |
neon1024 |
We only have read-only web services |
# |
Dec 6th 2019, 11:55 |
neon1024 |
@admad Nope |
# |
Dec 6th 2019, 11:53 |
admad |
@neon1024 have you used `Endpoint::deleteAll()` from the webservice plugin ? |
# |
Dec 6th 2019, 10:59 |
admad |
The plugin is for using that db with cake |
# |
Dec 6th 2019, 10:59 |
admad |
@latenal sounds like you are not familiar with elastic search https://www.elastic.co/products/elasticsearch |
# |
Dec 6th 2019, 10:56 |
dereuromark |
I dont think it should replace it, it should copy it with a denormalized way of data storage to quickly find what one is looking for. |
# |
Dec 6th 2019, 10:56 |
dereuromark |
See the contributors or maintainers list. |
# |
Dec 6th 2019, 10:54 |
latenal |
@dereuromark This is the one I am talking about |
# |
Dec 6th 2019, 10:52 |
dereuromark |
The plugin might shed some light |