Summary
Extended API for editing the form body tree (MergeableNode). Enables programmatic form manipulation without dealing with raw XML.
Tasks
Context
Today, traversing the form tree requires manual recursion:
void CollectControls(MergeableNode node, List<string> fields, string pattern)
{
if (node.Name == "control")
{
var fieldName = node.GetAttribute("datafieldname");
if (fieldName?.Contains(pattern) == true)
fields.Add(fieldName);
}
foreach (var child in node.Children)
CollectControls(child, fields, pattern);
}
This should be a first-class API on MergeableNode.
Ref: docs/roadmap.md Milestone 4.
Summary
Extended API for editing the form body tree (
MergeableNode). Enables programmatic form manipulation without dealing with raw XML.Tasks
AddControl(sectionId, control)— add control to sectionRemoveControl(controlId)— remove control from formMoveControl(controlId, targetSectionId, position)— move control between sectionsFindNode(predicate)— generic tree searchFindNodesByAttribute(attrName, pattern)— search by attribute value (e.g., find all controls withdatafieldnamecontaining "vat")Context
Today, traversing the form tree requires manual recursion:
This should be a first-class API on
MergeableNode.Ref:
docs/roadmap.mdMilestone 4.