def update()

in src/simplify_docx/elements/form.py [0:0]


    def update(self, other: el) -> bool:
        """
        Update an incomplete field character
        """

        if self.status == "complete":
            RuntimeError("Logic Error: Updating a completed field data")

        if isinstance(other, fldChar):
            if other.props["fldCharType"] == "begin":
                raise RuntimeError("Unhandled nesting of data fields")

            if other.props["fldCharType"] == "separate":
                self.status = "fieldResults"
                return False
            if other.props["fldCharType"] == "end":
                self.status = "complete"
                return True

        if self.status == "fieldResults":
            self.fieldResults.append(other)
        else:
            self.fieldCodes.append(other)
        return False