[3.0.0] Maintaining automated Permalink Generation when using getCreateForm to add fields.
As soon as I add any fields, using the Formbuilder on this function, the automated permalink disappears.
is there a simple way of maintaining the permalink functionality, even by attaching it to a suitably named text field?
I think the workaround for me right now, is just run with just the title, and make the other fields required in the main (editing) form.
However, I would have thought that when including...
$form = parent::getForm($model);
...at the start, it might have maintained such functionality.
I notice that the parent function just returns a new form, so wondering at which point the js creating the automated permalink behaviour needs / should be injected to maintain functionality. Maybe this is the intended behaviour and not a bug?9 Replies
see onChange on the title, and ref on the slug field
Thanks @ifox.dev. Totally missed that, partly with Guides being a separate top level section. I thought I remembered see something about it in the old docs. Apologies
all good, and yes some guides could be merged into the docs
They might, but there might be value in expanding the range of guides, and keeping the terser docs section.
The challenges for documentation in general is to address both 'how' to use / implement a feature, but also, 'why' would I need to use that feature.
Keeping a separation between learning for the complete noobs (guides; why) and and the intermittant knowedgeable users (docs; how). They rest of you can just go to the API refs whenever you get old and your memory starts to fail! 😜
for that last part IDE completions too
the blade approach for forms and a lot of configuration based feature on Twill 2 wasn't allowing a lot of that
but on Twill 3, everything is right there
Absolutely right. Very handy to pop along to the class file for the function.
for example, in the setup method of the controller
$this->dis
would show all the features that can be disabledI'm a long time user of PHPStorm. Not only completion, but also the class insertion. I don't know how many times I saw something pop up on a list of available functions and thinking 'Oh, there's a function to do that'.