
766 So.2d 857 (2000)
Kenneth THOMAS
v.
Kathy Thomas NORMAN.
2981450.
Court of Civil Appeals of Alabama.
March 31, 2000.
*858 Charles B. Haigler III of Robison & Belser, P.A., Montgomery, for appellant.
J. Myron Smith of J. Myron Smith & Associates, Prattville, for appellee.
YATES, Judge.
This is a custody-modification case. The parties were divorced in September 1991 and, pursuant to an agreement of the parties, the mother and father were awarded joint legal and physical custody of their two minor children. The parties amended the agreement in July 1995, allowing the children to reside with the father during the school year. The parties again amended the agreement in July 1997, allowing the children to reside with the mother during the 1997-98 school year. In February 1999, the mother petitioned to modify the divorce judgment, seeking temporary custody of the children and alleging that the father had been physically abusive toward one child on at least two occasions; that the children were fearful of their father; that the father drank alcohol excessively and was in denial of his alcohol addiction; and that it was in the best interests of the children to be removed from the father's custody. The court granted temporary custody to the mother.
Following an ore tenus proceeding, the court, on July 7, 1999, awarded legal and physical custody of the minor children to the mother, with reasonable visitation to the father. The court further ordered that the father "shall restrain himself from the use of alcoholic beverages and shall not allow anyone to have contact with the children while alcoholic beverages are being consumed" and ordered the father to pay $778 per month in child support, "the same being in compliance with [the Alabama Child Support Guidelines,] Rule 32, Ala. R. Jud. Admin., as found by this Court." The court awarded the mother $2,625 in attorney fees and a deposition expense of $370.27. The father filed a postjudgment motion, which the court denied. This appeal followed.
The father argues that the court erred in awarding the mother custody of the children because, he says, the mother failed to prove her allegations of verbal and physical abuse of the children; that the child-support order deviated from the guidelines, without an explanation, and that the amount was not supported by the record; and that the mother was not entitled to an attorney fee and the deposition cost.
"The ore tenus rule is applicable to child-custody-modification proceedings, and the court's judgment based on its findings of fact will not be reversed absent a showing that the findings are plainly and palpably wrong." E.M.C. v. K.C.Y., 735 So.2d 1225, 1227 (Ala.Civ.App.1999). This court has established the following standards of proof in custody-modification actions:
"`Where the parties agree to joint legal custody and shared physical custody of the children without a judicial determination preferring either parent, "custody [is] appropriately determined by the trial court according to what [is] in the `best interest' of the children." Ex parte Couch, 521 So.2d 987, 989 (Ala. 1988). However, where the parents have joint legal custody, but a previous judicial determination grants primary custody to one parent and secondary custody to the other, "the trial court [is] correct in applying the McLendon standard and requiring the [parent] to show that a change in custody would materially promote the welfare and best interests of the child, offsetting the disruptive effect of uprooting the child. [Ex parte McLendon, 455 So.2d 863 (Ala. 1984).]"'"
Hoplamazian v. Hoplamazian, 740 So.2d 1100, 1102 (Ala.Civ.App.1999) (citation omitted).
The parties' original divorce agreement provided that they would have joint legal and physical custody of the minor children; the amended agreements gave both parents respective periods of sole physical custody. The court, in its order, stated that "a material change in circumstances *859 has arisen between the parties, as to their relationship between the children and the parents, that warrants a change in the custody" and that "it is to the children's better interest for their custody to be changed from jointly between both parents and placed in the mother." The undisputed testimony of the mother and the medical reports admitted into evidence substantiated that one of the children had sustained an injury to his ear after being struck by the father,[1] supporting the court's determination that it is the best interests of the children to be placed in the sole legal and physical custody of the mother. Accordingly, the judgment of the trial court as to custody is affirmed.
As to the issue of child support, this court has consistently held that the application of Rule 32 is mandatory in child-support actions filed on or after October 9, 1989. State ex rel. Dep't of Human Resources v. Hogg, 689 So.2d 131 (Ala.Civ. App.1996). A trial court may deviate from the child-support guidelines in determining a child-support amount; however, any deviation is improper if it is not justified in writing. In Martin v. Martin, 637 So.2d 901, 902 (Ala.Civ.App.1994), this court issued the following directive:
"We hold, therefore, that the word `shall' in Rule 32(E), Ala. R. Jud. Admin., mandates the filing of a standardized Child Support Guidelines Form and a Child Support Obligation Income Statement/Affidavit Form."
Compliance with Rule 32(E) is mandatory, even though the trial court may find that the application of the guidelines would be unjust or inequitable. Id. When the court determines that application of the guidelines would be manifestly unjust or inequitable, and then deviates from the guidelines in setting a support obligation, the court must make the findings required by Rule 32(A)(ii), Ala. R. Jud. Admin. Hogg, supra. When Rule 32(E) has not been complied with and child support is made an issue on appeal, this court may reverse the judgment of the trial court and remand the case for further proceedings in compliance with Rule 32. See Nelson v. Landis, 709 So.2d 1299 (Ala.Civ.App.1998); Mitchell v. Mitchell, 723 So.2d 1267 (Ala.Civ. App.1998).
Although the trial court states that its award of $778 per month in child support is in compliance with Rule 32, we are unable to determine from the record how the court calculated the amount. The record contains CS-41 and CS-42 child-support forms completed by the mother; however, it does not contain those forms completed by the father. The mother has imputed gross monthly income of $6,000 to the father, and she states that her gross monthly income is $1,549, with a resulting monthly child-support obligation of $1,032. The father testified that he received $211,000 in gross receipts from his business in 1998 and that he had disposable income of approximately $21,000. This court cannot discern how the trial court determined the support obligation of $778 per month. That portion of the judgment regarding the father's current child-support obligation is reversed and the case is remanded for the trial court to file a completed and signed CS-42 Child Support Guidelines Form indicating the proper support obligation. See State ex rel. Dunnavant v. Dunnavant, 668 So.2d 851 (Ala. Civ.App.1995). If the court determines that application of the guidelines is manifestly unjust or inequitable, and then deviates from the guidelines in setting a support obligation, it must make the findings required by Rule 32(A)(ii). Hogg, supra.
Finally, this court has previously held that "an award of an attorney fee in a domestic relations case is within the sound discretion of the trial court and, absent an abuse of that discretion, its ruling on that question will not be reversed." Thompson v. Thompson, 650 So.2d 928 (Ala.Civ.App. 1994). Accordingly, we affirm that portion *860 of the judgment awarding the wife an attorney fee and the deposition cost.
The mother's request for an attorney fee on appeal is denied.
AFFIRMED IN PART; REVERSED IN PART; AND REMANDED WITH INSTRUCTIONS.
ROBERTSON, P.J., and MONROE, CRAWLEY, and THOMPSON, JJ., concur.
NOTES
[1]  Dr. Neil Stronach's report stated: "Anterior central perforation is noted in the R ear. With window shading of the tympanic membrane and fresh blood."
