Keiteria Anderson (“the mother”) petitions this court for a writ of mandamus directing the Jefferson Circuit Court to set aside its September 16, 2014, “pendente lite” order, which awarded pendente lite custody of her children to Gregory Michael Pratt (“the father”). After reviewing the petition, the materials submitted in support of the petition, and the father’s answer, we grant the petition and issue the requested writ.
On September 3, 2014, the father filed a verified petition seeking to have the mother held in contempt based on her alleged violation of several provisions of the parties’ April 2014 divorce judgment. Among other things, the father alleged in the petition that the mother had not permitted him to exercise all the visitation rights provided to him in the judgment and that the mother intended to move from the state with the children. On the same day that he filed his contempt petition, the father filed a verified petition for a “temporary ex parte restraining order” to prevent the mother from leaving the state with the children. The trial court granted the restraining order on September 3, *6792014, and the mother was served with the contempt petition, the petition for the restraining order, and the restraining order oh September 4, 2014.
On September 10, 2014, the trial court entered an order setting the cause for a hearing to be held on September 16, 2014. The copy of the State Judicial Information System case-detail sheet contained in the exhibits to the mother’s petition for the writ of mandamus indicates that the order setting the hearing was transmitted by the trial court clerk.1 However, the mother did not appear at the September 16, 2014, hearing.
In its “pendente lite” order, entered after the hearing, the trial court noted that it had verified with the clerk that the mother had been provided notice of the hearing. The trial court’s order further reports that the trial court had attempted to contact the mother by telephone to inform her that the hearing was being conducted but that the mother did not answer the telephone. The trial court conducted the hearing, and, after considering the father’s testimony, found that the mother had violated the divorce judgment in several respects regarding visitation. The trial court then awarded the father pendente lite custody of the parties’ children without indicating a basis for the transfer of custody. The order reserved the issues of pen-dente lite child support and pendente lite visitation and noted that the “cause shall be set for review by separate order.”
Later on September 16, 2014, after she received the telephone message left by the trial court, the mother, acting pro se, filed a handwritten statement requesting a hearing. In that statement, the mother stated that she had been unaware of the hearing held earlier that day. The mother later sought the aid of an attorney, who, on October 23, 2014, filed this petition for the writ of mandamus with this court.
“ ‘A writ of mandamus is an extraordinary remedy ... that should be granted only if the trial court clearly abused its discretion by acting in an arbitrary or capricious manner.’ Ex parte Edwards, 727 So.2d 792, 794 (Ala.1998). The petitioner must demonstrate:
“ ‘ “(1) a clear legal right in the petitioner to the order sought; (2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; (3) the lack of another adequate remedy; and (4) properly invoked jurisdiction of the court.” ’
“Ex parte Edwards, 727 So.2d at 794 (quoting Ex parte Adams, 514 So.2d 845, 850 (Ala.1987)).”
Ex parte D.J.B., 859 So.2d 445, 448 (Ala.Civ.App.2003).
The mother argues that she was not provided notice of the September 16, 2014, hearing. She also argues that the father had not requested that he be awarded custody in any of his pleadings and that, therefore, the trial court’s award of pen-dente lite custody to the father violated the mother’s right to due process because she was not on notice that the issue of custody was to be considered by the trial court. We agree with the mother’s second argument.
It is well settled that a parent facing the potential loss of his or her right to custody of a child is entitled to due process.
“In a case involving a custody dispute, this court held:
*680“ ‘ “A parent must have notice of the issues the court will decide in order to adduce evidence on those issues before the court, to give the court a basis from which a determination most beneficial to the child can be made. Otherwise, the child, rather than being helped, might even be harmed.” ’
“Ex parte Franks, 7 So.3d 391, 395 (Ala.Civ.App.2008) (quoting Thorne v. Thorne, 344 So.2d 165, 170 (Ala.Civ.App.1977)) (emphasis added). Furthermore, the desires of the [parent seeking custody] are not the paramount consideration. Even in cases in which a noncustodial parent has sought pendente lite custody, this court has held
“ ‘that due process requires that, in an action seeking to modify custody, the party seeking an award of pendente lite custody must “introduce evidence establishing that an award of penden-te lite custody to him [or her is] in the best interest of the child.” Ex parte Russell, 911 So.2d [719] at 725 [ (Ala.Civ.App.2005) ]. See also Ex parte Norlander, 90 So.3d 183 (Ala.Civ.App.2012); Ex parte Couey, 110 So.3d 378 (Ala.Civ.App.2012) (the allegations in the father’s motion for pen-dente lite custody were insufficient to warrant a transfer of pendente lite custody without first affording the mother notice and an opportunity to be heard).’
“Ex parte Dean, 137 So.3d 341, 346 (Ala.Civ.App.2013) (footnote omitted.)”
M.F. v. W.W., 144 So.3d 366, 369-370 (Ala.Civ.App.2013). Our supreme court has set out one exception to the requirement that a parent be provided notice and an opportunity to be heard before being deprived of the custody of his or her child, determining in Ex parte Williams, 474 So.2d 707, 710 (Ala.1985) (quoting Thorne v. Thorne, 344 So.2d 165, 171 (Ala.Civ.App.1977), quoting in turn Ex parte White, 245 Ala. 212, 215, 16 So.2d 500, 503 (1944)), that an ex parte award of custody may be made without notice to a parent if “ ‘ “the actual health and physical well-being of the child are in danger.” ’ ” (Emphasis omitted.)
The pleadings filed by the father do not request a modification of the parties’ custody rights as set out in the April 2014 judgment. The father sought only to have the mother held in contempt for violating the visitation provisions of that judgment and to have the mother restrained from relocating to another state.2 The father makes no allegation that the children’s health or physical well-being is in any danger.3 Furthermore,' we have ex*681plained that consent to try an issue not pleaded may not be implied under Rule 15(b), Ala. R. Civ. P., when a party does not attend a hearing, see Casey v. Casey, 142 So.3d 1174, 1181 (Ala.Civ.App.2013), so the trial court’s award of pendente lite custody could not possibly rest on any attempt by the father to inject the custody issue into the proceedings at the September 16, 2014, hearing.
The mother was not provided notice that she could possibly be deprived of her right to the custody of the children. Thus, the trial court’s order, insofar as it awarded pendente lite custody of the children to the father, was entered without affording the mother her right to due process. The mother has met the requirements for the issuance of a writ of mandamus, including demonstrating a clear legal right to the relief she seeks, and, thus, her petition is granted.
PETITION GRANTED; WRIT ISSUED.
THOMPSON, P.J., and PITTMAN, MOORE, and DONALDSON, JJ., concur.. We note that the entry on the case-detail sheet states that the clerk sent "e-notice trans-mittals,” which, we presume, indicates that the transmission of the order setting the hearing was accomplished through the courts’ electronic-filing system.
. We note that visitation disputes cannot serve as a basis for the modification of a custody judgment.
"At any rate, modification of custody is not the proper remedy for a visitation dispute. Foster v. Carden, 515 So.2d 1258, 1260 (Ala.Civ.App.1987); Smith v. Smith, 464 So.2d 97, 100 (Ala.Civ.App.1984).
‘Rather, the appropriate remedy in such a situation is to punish the custodial parent for contempt, not to uproot the children. Lami v. Lami, 564 So.2d 969, 970 (Ala.Civ.App.1989).”
Cochran v. Cochran, 5 So.3d 1220, 1228-29 (Ala.2008).
. The father stated in his verified petition for the "temporary ex parte restraining order” that someone had reported to him that the mother "was acting erratically and was off her medication for mental health.” However, he did not allege that the children’s health or physical well-being was endangered, and we will not infer such from the mere statement that the mother might suffer from mental-health issues requiring medication. See Ex parte Franks, 7 So.3d 391, 396 (Ala.Civ.App.2008) (refusing to infer from harassing conduct of father at mother’s place of employment that the health or physical well-being of the children was in danger); Ex parte Russell, 911 So.2d 719 (Ala.Civ.App.2005) (declining *681to infer that an allegation that the mother had committed domestic violence against the father sufficed as an allegation that the children's health or well-being was in danger).