This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi,
I tried to create my own plugin just as learning purpose. I create a backend controller with with form and list behaviour, everything is rolling nice and I'm actually amazed by how simple it is easy use. There is just one thing I don't catch is the onDelete redirection. When I save or create (save + save and close) it redirect properly in the pages I defined in the config, when I delete it redirect to the backend dashboard page (/backend). Even if i use the data-redirect attribute in the delete button it doesn't change anything.
cheers
Last updated
It should go to the update redirect in the config_form.yaml file, so
update: redirect: axomat/wff/flowers redirectClose: axomat/wff/flowers
would go to the flowers page after deleting on a form.
Yes, it's what I did and it works for save and save and close. only the delete, is there anything special to add to the button
Last updated
I'm not sure I really understand then. On the example of the doc, we use the method formRender() on the view but we have to add the button after that. https://octobercms.com/docs/backend/forms#form-views
I just add the button with the data-request="onDelete" attribute as described in the doc here is my update.htm file http://pastie.org/9838956
cheers
Sorry my post was wrong, I forgot I just cut and paste the button without thinking nowadays :-)
So the only other thing I can think of is to try using
"defaultRedirect used as a fallback redirection page when no specific redirect page is defined."
Hi, No problem You mean in the registration_form.yaml, I just tried, it doesn't change much. http://pastie.org/9839674
Oh I catch it, it's on the yaml root node. It works perfectly now. here is my working example : http://pastie.org/9839678 Thanks
1-8 of 8