# |
Nov 18th 2019, 19:56 |
michaelze |
And maybe rethink the "not using the FormHelper" part of your question... :slightly_smiling_face: |
# |
Nov 18th 2019, 19:55 |
michaelze |
Just use the URL to your controller action as the form's action. Usually, that's /<controllername>/<action> where <controllername> is the under_scored version of the controller's name (e.g. shopping_carts for ShoppingCartsController. The <action> is just the name of the action function in your controller... |
# |
Nov 18th 2019, 19:51 |
johnpaul5421 |
Sorry, I just wanted to get some feedback. Using Cakephp 2.0, how can I submit form data from a view class to the controller without using the functions echo $form->create and echo $form->submit('Save'); My Action function is Add in the controller, which then will apply $this->RequestHandler->isAjax() or isPost. |
# |
Nov 18th 2019, 18:58 |
luizcmarin |
I saw that "file input, Kartik" was added to the cake4 update. Does anyone have any information on how to use it on cake? |
# |
Nov 18th 2019, 18:53 |
devito |
Has anyone ever used angular as the frontend and cake as the backend? Whats that experience like? |
# |
Nov 18th 2019, 18:48 |
ricksaccous |
oops wrong window |
# |
Nov 18th 2019, 18:48 |
ricksaccous |
y |
# |
Nov 18th 2019, 17:24 |
jotpe |
`$this->get()` seems to work. |
# |
Nov 18th 2019, 17:21 |
jotpe |
Yes, it's latest 3.x |
# |
Nov 18th 2019, 17:19 |
admad |
*I don't think |
# |
Nov 18th 2019, 17:19 |
admad |
i think view vars passed to View class ever populated it's view builder. In 4.x `View` doesn't even have a viewbuilder |
# |
Nov 18th 2019, 17:18 |
admad |
@jotpe just use $this->get() in the view |
# |
Nov 18th 2019, 17:09 |
dereuromark |
is that latest 3.x? sounds like the proper delegation is then not yet fixed in 3.x series. |
# |
Nov 18th 2019, 17:04 |
slackebot |
<jotpe> |
# |
Nov 18th 2019, 17:04 |
jotpe |
Any ideas why in my custom view I can't access my view Variables via `viewBuilder()->getVar()`? |
# |
Nov 18th 2019, 16:09 |
johnpaul5421 |
css, is there anyway to redirect this form submitted data to the control, using the Action parameter, so that when I submit the request to the control, then create a function add, $this->RequestHandler->isAjax(). Also is it possible to do this in the view form, without using echo $form->create and echo $form->submit('Save'); echo $form->end(); I just created a big form using the regular html way. |
# |
Nov 18th 2019, 15:56 |
johnpaul5421 |
Hello everyone, |
# |
Nov 18th 2019, 15:28 |
peppejaripappalardo |
Hello to everyone, i need a little help for muffin/trash for soft-delete. I have to remove a behavior on UsersTable from a custom class. Is correct to do it with this code? `TableRegistry::get('Users')->removeBehavior('Trash');` ` TableRegistry::get('Users')->addBehavior('Muffin/Trash.Trash', [` ` 'events' => ['Model.beforeFind']` ` ]);` |
# |
Nov 18th 2019, 15:28 |
neon1024 |
Then you might consider a virtual field |
# |
Nov 18th 2019, 15:23 |
lpj145 |
thanks @neon1024 but i'm not using a FormHelp, is only for API. |
# |
Nov 18th 2019, 15:11 |
neon1024 |
Worth bearing in mind, if you overwrote the error structure the form helper would not be able to automatically output the validation errors |
# |
Nov 18th 2019, 15:10 |
neon1024 |
..but if you needed to do it I’d write an entity accessor method which wrapped `getErrors()` and returned your custom format |
# |
Nov 18th 2019, 15:10 |
neon1024 |
Changing the way an entity reports it’s errors seems pointless |
# |
Nov 18th 2019, 15:10 |
neon1024 |
Errors are keyed by the name of the validation rule |
# |
Nov 18th 2019, 14:55 |
lpj145 |
without write some logic ? |
# |
Nov 18th 2019, 14:55 |
lpj145 |
is possible ? |
# |
Nov 18th 2019, 14:55 |
lpj145 |
i'm think on "errors": [ "nasname": "my custom validation message here"] |
# |
Nov 18th 2019, 14:54 |
lpj145 |
i'be used this options but, he not alter structure of errors, only, placeholder my message validation. |
# |
Nov 18th 2019, 14:34 |
neon1024 |
@lpj145 You use the `'message'` option in the validation configuration |
# |
Nov 18th 2019, 13:59 |
lpj145 |
i think is not a good data structure to verify on client side. |
# |
Nov 18th 2019, 13:58 |
slackebot |
<lpj145> |
# |
Nov 18th 2019, 13:58 |
slackebot |
<lpj145> |
# |
Nov 18th 2019, 13:58 |
slackebot |
<lpj145> |
# |
Nov 18th 2019, 13:57 |
lpj145 |
Hi friends! is possible to customize validations errors return ? |
# |
Nov 18th 2019, 13:43 |
acosonic |
irc rocks I hate slack :) |
# |
Nov 18th 2019, 13:41 |
ndm |
@rsteenge You can modify the validator, but you're probably better off using a separate validation set instead, see https://book.cakephp.org/3/en/orm/validation.html#using-a-different-validation-set |
# |
Nov 18th 2019, 13:38 |
ndm |
@sam.fry If it's a false positive, then you'll need to teach your tool that. If you believe it's a bug in Chronos, then you should probably open an issue over at GitHub. |
# |
Nov 18th 2019, 13:04 |
rsteenge |
Is it possible in cakephp 3 to remove validation rules for some fields in the controller? |
# |
Nov 18th 2019, 12:57 |
jotpe |
Okay, thanks @ndm |
# |
Nov 18th 2019, 12:57 |
sam.fry |
Because this commit (https://github.com/cakephp/chronos/commit/c46796e761da7a06ad57e8a635ced33ab0cbfb6e) is causing us some issues :c |
# |
Nov 18th 2019, 12:55 |
sam.fry |
Hi all :wave: is this a good place to get Chronos support? |