Hi,
In case someone needs to validate on rename, just do something like:
tree.addEvent('rename', function (node, name_new, name_old) {
// do validation here
});where tree is an instance of Mif.Tree
You are not logged in. Please login or register.
Mifjs forum — Mif.Tree, Mif.Menu » Help » how to count child nodes and how to validate on rename() ? » Post new reply
All fields labelled (Required) must be completed before the form is submitted.
Hi,
In case someone needs to validate on rename, just do something like:
tree.addEvent('rename', function (node, name_new, name_old) {
// do validation here
});where tree is an instance of Mif.Tree
there is no build-in validation functionality
Not again. I'm answering my own question. node.recursive() works for counting the child nodes.
![]()
Hi,
Is there a way to count child nodes of any given parent?
How can I validate the node's new name on rename()? I think I can just call rename() and restore the previous name if the validation fails, but perhaps there's already a built-in functionality for this?
Regards,
[ simon.cpu ]
Powered by PunBB