A. Any resident of this state fourteen years of age or older may, upon petition to the district court of the district in which the petitioner resides, if no sufficient cause is shown to the contrary, have the petitioner’s name changed or established by order of the court. The legal parents or legal guardians of any resident of this state under the age of fourteen years may, upon petition to the district court of the district in which the petitioner resides, if no sufficient cause is shown to the contrary, have the name of the petitioner’s child or ward changed or established by order of the court. When residents under the age of fourteen years petition the district court for a name change, notice shall be given to all legal parents or legal guardians. The order shall be entered at length upon the record of the court, and a copy of the order, duly certified, shall be filed in the office of the county clerk of the county in which the person resides. The county clerk shall record the same in a record book to be kept by the county clerk for that purpose.
B. If the court finds that notice to one or more legal parents or legal guardians of a child who is under fourteen years of age will jeopardize the child’s or the applicant’s personal safety, the court shall not require notice. The court shall order all records regarding the petition to be sealed. The records shall only be opened by court order based upon a showing of good cause or at the applicant’s request.