
737 S.W.2d 110 (1987)
ROBINWOOD BUILDING AND DEVELOPMENT COMPANY, Appellant,
v.
Ruthielene PETTIGREW and Courtney Pettigrew, Appellees.
No. 12-86-0219-CV.
Court of Appeals of Texas, Tyler.
August 31, 1987.
H. Kelly Ireland, Tyler, for appellant.
Nell Hahn, Daves, McCabe & Hahn, Tyler, John C. Fisher, Longview, for appellees.
BILL BASS, Justice.
This is an action brought under the Texas Deceptive Trade Practices Act. Plaintiffs-appellees (Pettigrews) sued appellant *111 (Robinwood) for damages resulting from defects in Robinwood's construction of their home. The Pettigrews alleged negligence, breach of warranty, breach of contract, and a number of specific violations of the DTPA. The Pettigrews specially prayed for additional damages under the DTPA of two times their actual damages not exceeding $1,000. Their special prayer further alleged that Robinwood committed the violations knowingly and that they should also recover three times the amount of actual damages in excess of $1,000. The Pettigrews' petition concluded with a prayer for attorneys' fees, costs of suit, and general relief. The language of the special prayer essentially follows the measure of damages recoverable under the Act since the 1979 amendments. Prior to August 23, 1979, a consumer who prevailed in a suit brought under the Act was entitled to treble damages even without a finding by the trier of facts that the violations were committed knowingly.
Robinwood poured the slab foundation of the Pettigrews' house in June, 1978, and completed the home in October of the same year. The record indicates that the first crack in the foundation appeared shortly after it was poured. The other defects, all apparently referable to the faulty foundation, began to appear shortly after the house was finished. Although the Pettigrews' first written notice to Robinwood was not until October, 1979, there seems to be no question that the cause of action arose prior to the effective date of the 1979 amendments.
The jury found that Robinwood failed to prepare the slab foundation in a good and workmanlike manner which was a producing cause of damage to the Pettigrews in the amount of $19,000. There was no finding that Robinwood's violations were committed knowingly. The jury further found Pettigrews' reasonable and necessary attorneys' fees to be $20,000 through trial, $2,500 in event of appeal to the Court of Appeals, $1,500 if application is made for writ of error to the Supreme Court, and $1,000 if such writ of error is granted.
The trial judge trebled the actual damages found by the jury and rendered judgment for the Pettigrews for $57,000.00, and for attorneys' fees as found by the jury.
The principal question presented in this appeal is whether the plaintiff's-appellees are entitled to treble damages recoverable under the DTPA at the time their cause of action arose despite their inadvertent special prayer for the more limited measure of damages provided by the Act since its 1979 revision.
The Texas Supreme Court determined in Woods v. Littleton, 554 S.W.2d 662 (Tex. 1977), that it is the date of the acts which give rise to the cause of action under the DTPA that determines its applicability, and that the Act, as then written, mandated an award of treble damages to the successful consumer-plaintiff. Since the unworkmanlike laying of the foundation, the act giving rise to the Pettigrews' cause of action, occurred before the effective date of the 1979 amendments, it appears the case should be governed by the 1977 version of the DTPA, and that the trial court was correct in trebling actual damages. However, it is Robinwood's contention, in its first assignment of error, that the Pettigrews' recovery is limited to the measure of recovery for which they specially prayed. Therefore, they argue, since there was no finding that Robinwood's violation was committed knowingly, no multiplication of actual damages in excess of $1,000 is proper. Robinwood complains that the appellees' petition did not indicate a claimed cause of action antedating the effective date of the 1979 amendments except insofar as it alleged that Robinwood was advised orally of the defects prior to October 5, 1979. Therefore it was unfairly surprised by the trial court's application of the 1977 version, innocently assuming the applicability of the 1979 version and foregoing the raising of defenses available to it under the 1977 Act but eliminated by the 1979 amendments.
Tex.R.Civ.Proc. 301 embodies the elementary and ancient rule that "[t]he judgment of the court shall conform to the pleadings, the nature of the case proved *112 and the verdict, if any, and shall be so framed as to give the party all the relief to which he may be entitled either in law or equity." But in applying the rule, Texas courts have long held that the measure of relief granted in the judgment is determined by allegations of fact contained in the petition and proven at trial, not merely the matters prayed for. Milliken v. Smoot, 64 Tex. 171 (1885); Morrissey v. Jones, 24 S.W.2d 1101 (Tex.Civ.App.San Antonio 1930, no writ); Gilbreath v. Douglas, 388 S.W.2d 279 (Tex.Civ.App.Amarillo 1965, writ ref'd n.r.e.).
In Silberberg v. Pearson, 75 Tex. 287, 12 S.W. 850 (1889), Pearson, in addition to his prayer for general relief, sought cancellation of his deed to Silberberg claiming it was solely intended as a mortgage. The trial court granted judgment for title to the premises although there was no special prayer for that remedy. The Supreme Court affirmed the judgment, stating "[a]lthough the plaintiff's, in their special prayer, may have mistaken the relief to which they were entitled, in response to the prayer for general relief they may be awarded the relief to which the pleadings and evidence may entitle them." Silberberg, 12 S.W. at 851; see also Clark v. Wisdom, 403 S.W.2d 877 (Tex.Civ.App. Corpus Christi 1966, writ ref'd n.r.e.).
In the often cited case of Lee v. Boutwell, 44 Tex. 151 (1875), Judge Oran Roberts, writing for the Court, observed that "[w]here the plaintiff has prayed for general relief he may recover whatever the facts alleged and proved will entitle him to, although he may have prayed for a special relief for which the facts of his petition as alleged do not constitute an appropriate predicate."
However it should be noted that a prayer for general relief does not authorize a form of relief that, though consistent with the pleadings, takes the defendant by surprise. Denison v. League, 16 Tex. 400 (1856). The Pettigrews' petition alleged several defects attributable to the poor construction of their home which was completed in 1978. Given the facts pleaded, as well as the evidence at trial, the application of the 1977 version of the DTPA should have come as no surprise to Robinwood. It is more likely it was surprised by the Pettigrews' special plea for a more restricted as well as inapplicable measure of damages.
There is another rule of law that serves to uphold the judgment. "In actions where the statutes or the rules wholly or partly control the form of judgment to be entered, the court may look to the statute or rule, and may award relief differing from that described in the special prayer, provided the judgment complies with the applicable enactment." 2 R. McDonald, Texas Civil Practice § 6.28 (1982). This is the case even in the absence of a general prayer. Hipp v. Huchett, 4 Tex. 20 (1849). The DTPA is not a codification of common law. It provides a purely statutory cause of action and specifies the relief to be granted. The Pettigrews' cause and remedy are governed by the Act as it read at the time their cause of action arose, which was before the effective date of the 1979 amendments. The trial court did not err in trebling the Pettigrews' actual damages, and Robinwood's first point is overruled.
In its second point of error Robinwood urges that "[t]he trial court erred in entering judgment for attorneys' fees for... the various stages of appeal without conditioning those awards upon Appellant's failure to succeed on appeal." A party may not be penalized for the successful appeal of error in the lower court's judgment. King Optical v. Automatic Data Processing of Dallas, 542 S.W.2d 213 (Tex. Civ.App.Waco 1976, writ ref'd n.r.e.). However, it is implicit in the court's judgment that all the attorneys' fees awarded, trial and appellate, are conditioned on the judgment's successful survival of the appellate process. The point is overruled.
The judgment is affirmed.
