We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a function to handle the common pattern of wanting "all elements under this container" (section or repeatable).
Currently we have:
// all direct child element of the repeatable FIELD('repeatable').elements
But many, if not most times, it's desirable to have all of the repeatable's descendants.
FIELDS('repeatable');
Possible implementation:
function FIELDS(dataName) { var eachRecursive = function(elements, iterator) { elements.forEach(function(element) { if (element.elements) { eachRecursive(element.elements, iterator); } iterator(element); }); }; var elements = []; eachRecursive(FIELD(dataName), function(element) { elements.push(element); }); return elements; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add a function to handle the common pattern of wanting "all elements under this container" (section or repeatable).
Currently we have:
But many, if not most times, it's desirable to have all of the repeatable's descendants.
Possible implementation:
The text was updated successfully, but these errors were encountered: