
258 Ga. 18 (1988)
365 S.E.2d 97
ALVAREZ
v.
SILLS.
45031.
Supreme Court of Georgia.
Decided February 25, 1988.
Linda I. Hay, Vicky O. Kimbrell, Phyllis, J. Holmen, John L. Cromartie, Jr., for appellant.
Paul R. Gemmette, James A. Elkins, Jr., for appellee.
HUNT, Justice.
Kathy Thompson Alvarez filed a petition for habeas corpus seeking the return of her twin daughters from her aunt. The trial court dismissed the petition and the mother appeals. We reverse.
The mother, a Nebraska resident, obtained a divorce there in August of 1980 and was awarded permanent legal custody of the twins. In May 1981, the mother agreed in writing for her aunt, Nell Martin Sills, to have care and custody of the children for two years. The agreement provides that at the end of the two-year period, the mother would regain custody if she were able to care for the children adequately; if not, the aunt would retain custody indefinitely. If, however, the parties could not agree whether the mother could adequately care for the children, the agreement provides that the question of custody would be determined by a court of competent jurisdiction where the children reside. The trial court held that because of the agreement the aunt had legal custody and that the mother's habeas petition was barred by OCGA § 19-9-23 (d) of the Georgia Child Custody Intrastate Jurisdiction Act of 1978.
The Georgia Child Custody Intrastate Jurisdiction Act of 1978 and its prohibition against complaints in the nature of a habeas corpus seeking a change of custody, OCGA § 19-9-23 (d), cited by the trial court as precluding the mother's action, are inapplicable. That act governs the procedure to be followed by a party seeking a change in "legal custody," OCGA § 19-9-23 (a) and (b) (emphasis supplied), and defines "legal custodian" as "a person who has been awarded permanent custody of a child by a court order." OCGA § 19-9-22 (2). (Emphasis supplied.) Under the terms of the act, legal custody is not conferred by an agreement. Thus, the aunt does not have legal custody, the mother is not seeking a change in legal custody, and the act, and its prohibition, do not apply.
Moreover, the mother does not seek a "change of custody" under the act's terms. She claims there has been no transfer of permanent custody of her children from her to the aunt. She claims that the aunt's term of temporary custody under the agreement has expired. She claims that she is prepared to prove that she has met all conditions relating to the return of her children and that the aunt has failed to comply with the agreement, and has in fact, avoided communication *19 with the mother and hidden the children from her. The mother's petition states a claim for habeas corpus relief. Johnson v. Smith, 251 Ga. 1 (302 SE2d 542) (1983). Accordingly, the trial court erred by dismissing the petition.[1]
Judgment reversed. All the Justices concur, except Smith, J., who dissents. WELTNER, Justice, concurring.
I join in the majority opinion, and offer additional views.
1. OCGA § 9-11-2 provides: "There shall be one form of action, to be known as `civil action.'" In adopting that broad statement, the General Assembly sought to bury (once again) the intricacies of "forms of action" pleading.
In this case, Alvarez set out in her complaint a "short and plain statement of the claims showing that the pleader is entitled to relief." OCGA § 9-11-8. The name affixed to that pleading  whether "Petition for a Writ of Habeas Corpus" or "Complaint Pursuant to the Georgia Child Custody Intrastate Jurisdiction Act"  is an irrelevancy under the Civil Practice Act.
The complaint states a cause of action; the trial court had jurisdiction over the parties and the subject matter. Consequently, the complaint should not have been dismissed even if it had been called by the wrong name. In such a case, the trial court has full authority to allow the pleadings to be amended. OCGA § 9-11-15 (b).
2. As now Chief Justice Marshall stated in Dalton Carpet Industries v. Chilivis, 137 Ga. App. 266 (223 SE2d 460) (1976): "The right to amend pleadings under the Civil Practice Act is very broad, even to the extent that there is no prohibition against the pleading of a new cause of action by amendment." This is consistent with the leading case of Ellison v. Ga. R. Co., 87 Ga. 691, 714 (13 SE 809) (1891), where Chief Justice Bleckley wrote: "From what has been said, it is apparent that nothing less is enough to amend by in matter of substance in respect to the cause of action than a plaintiff, a defendant, jurisdiction of the court, and facts enough to indicate and identify some particular cause of action as the one intended to be declared upon, . . . and that when all these elements are in the declaration, there is enough to amend by."[*]
*20 SMITH, Justice, dissenting.
In its decision the majority ignores OCGA § 19-7-1 (b) (1) which expressly allows for child custody to be lost by voluntary contract. The majority also ignores the fact that the trial judge found, and wrote in his order, that because of the agreement, the appellee has custody. This finding is supported by the agreement which provides that the appellee would have indefinite custody (1) if the appellant, after two years, could not properly care for the children, or (2) until any disagreement by the parties about the appellant's ability to provide such care was resolved by a court upon proper petition.
The majority holds that OCGA § 19-9-23 (d) is inapplicable in this case because the appellee is not the legal custodian as required in OCGA § 19-9-23 (a). A legal custodian is defined as one "who has been awarded permanent custody of a child by a court order." OCGA § 19-9-22 (2). This statutory definition of "legal custodian" does not consider a "legal custodian" created by a contract as allowed by OCGA § 19-7-1 (b) (1). Regardless, this term's meaning is only important when a question arises about where the custody action "shall be brought" which is not an issue in this case. OCGA § 19-9-23 (a).
Because the trial judge found and set out in his order that the appellee had custody pursuant to OCGA § 19-7-1 (b) (1), there is no illegal detention. Without an illegal detention, a habeas corpus action will not lie. Whether the trial judge was right or wrong concerning the applicability of the Georgia Child Custody Intrastate Jurisdiction Act, "a judgment right for any reason must be affirmed." Simmons v. Boros, 255 Ga. 524, 525 (341 SE2d 2) (1986).
NOTES
[1]  This holding does not prevent the aunt from asserting the agreement as a defense. To do so she must demonstrate to the trial court's satisfaction that a release of custody was contemplated and effected, in accordance with our holdings in Bozeman v. Williams, 248 Ga. 606, 607 (285 SE2d 9) (1981) and Shaddrix v. Womack, 231 Ga. 628, 631 (3b) (203 SE2d 225) (1974), and that, under the evidence, a return of the children to the mother is not required.
[*]  For a discussion of the right to amend, see my very early effort, "The Right to Amend  A Case of Legislative Liberality Versus Judicial Conservatism," 12 Ga. Bar Journal 127 (1949).
