How to show error messages when you make a custom operation #427
-
Hi guys, this week I'm making a custom operation and I use this article as my reference it's all good, I did all of the steps correctly, but after that, I got some problems, after validation, the error messages didn't show up to the user, so I'm baffled, I'm trying to compare my file with another operation also the blade form, it's all good, nothing was wrong but it's still not showing the error messages, but today I think I figure it out, how to show the errors, I add 2 lines inside my setupYourOperationDefaults(), here are the details
Please let me know did I missing something. or this is not the way how to show the errors, thank you guys, I hope I can help someone with this. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Ooooh! That might actually be needed, yes. Thanks! @karandatwani92 do you think we need to add that to the article too? |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I know this is a bit old, I was just doing some late checking on the issues to get up-to-date. This indeed works if you follow the tutorial step by step. 👍 I think what @christmex is missing is the step to duplicate the config file. Copying the // How would you like the validation errors to be shown?
'groupedErrors' => true,
'inlineErrors' => true, Anyway this setting is a little bit hidden, a not properly documented on Backpack side. I say that we should probably add this to our documentation, but take advantage of it never been documented before and don't document the CrudPanel functions ( This settings belong to a future FormComponent and not to the CrudPanel object, so let's not use those functions to document it so that we can easily deprecated them in the future if/when needed. What do your think @karandatwani92 ? |
Beta Was this translation helpful? Give feedback.
-
I'm closing this issue due to inactivity. If you need further assistance or have additional questions, feel free to reopen this issue or create a new one. We're here to help! |
Beta Was this translation helpful? Give feedback.
Hey guys, I know this is a bit old, I was just doing some late checking on the issues to get up-to-date.
This indeed works if you follow the tutorial step by step. 👍
I think what @christmex is missing is the step to duplicate the config file.
Copying the
create
config into yourcustomOperation
config file, should get you this by default:Anyway this setting is a little bit hidden, a not properly documented on Backpack side.
I say that we should probably add this to our documentation, but take advantage of it never been documented before and don't document the CrudPanel func…