
481 So.2d 939 (1985)
Edward J. HOFER, Jr., and Diana Hofer, His Wife, Appellants,
v.
Howard P. ROSS, Appellee.
No. 85-1262.
District Court of Appeal of Florida, Second District.
December 20, 1985.
Rehearing Denied January 24, 1986.
William T. Keen, Tampa, for appellants.
Leo H. Meirose, Jr., of Battaglia, Ross, Hastings, Dicus & Andrews, St. Petersburg, for appellee.
SCHEB, Acting Chief Judge.
Edward and Diana Hofer appeal the trial court's order dismissing with prejudice their second amended complaint against Howard P. Ross. We reverse.
The Hofers filed their original complaint on June 22, 1984, alleging professional negligence against Ross, an attorney. The trial court dismissed their initial and first amended complaints with leave to amend.
In their second amended complaint, the Hofers made the following allegations. They had retained Ross to represent their interest in connection with the sale of their stock in a closed corporation. By using their home as collateral, the Hofers had secured a Small Business Administration (SBA) loan to finance their original purchase of this corporation. Therefore, they requested Ross to have the buyer replace them as guarantor on the loan. Ross prepared a letter dated May 20, 1980, directed to Mr. Hofer. The buyer signed this letter which Ross indicated would accomplish the result that the Hofers desired. The letter did not impose a deadline or specific date on which the buyer was to replace the Hofers as guarantor. Notwithstanding, the Hofers closed the transaction on Ross' advice and his repeated assurance that the letter protected their interests. When the buyer was unable to replace them as guarantor, the Hofers entered a compromise with the SBA on June 25, 1982, to secure their release from the loan. Under terms of the compromise, the Hofers paid the SBA $10,000 for their release from the obligation. They contended that Ross' negligence caused them to sustain this loss. They demanded judgment against Ross for $10,000 plus interest, costs, and attorney's fees.
Ross moved to dismiss the second amended complaint on several grounds, including that the Hofers failed to state a cause of action and that they were barred from recovery because the statute of limitations had run. On February 20, 1985, the trial court, after hearing arguments of counsel and reviewing the case file, dismissed the Hofers' second amended complaint with prejudice.
*940 The Hofers moved for a rehearing. The principal thrust of their motion was to have the court state the grounds for dismissal to enable them to seek appellate review. The court denied the motion but indicated that it had granted its order of dismissal on the basis of the statute of limitations.
On appeal the Hofers first contend that their second amended complaint stated a cause of action. Although it is not a model pleading, we agree. The Hofers alleged all the elements of a cause of action for negligence against their attorney. They asserted that they had employed Ross, that he negligently assured them the letter he drafted protected their interests and advised them to close the sale after the letter's execution, and that his negligence was the direct and proximate cause of their $10,000 loss on the loan from the SBA. See Drawdy v. Sapp, 365 So.2d 461 (Fla. 1st DCA 1978); Adams, George & Wood v. Travelers Insurance Co., 359 So.2d 457 (Fla. 3d DCA 1978).
Next, the Hofers assert that their action was not barred by the statute of limitations. Section 95.11(4)(a), Florida Statutes (1983), provides that a professional malpractice action must be commenced within two years from the time the cause of action is, or should have been, discovered with the exercise of due diligence. See Edwards v. Ford, 279 So.2d 851 (Fla. 1973). Ordinarily, the statute of limitations is an affirmative defense; however, an affirmative defense appearing on the face of a prior pleading may be asserted as a ground for a motion to dismiss under Florida Rule of Civil Procedure 1.140(b). See Fla.R. Civ.P. 1.110(d).
In this case there is nothing in the pleadings which discloses when the Hofers learned of the alleged negligence of Ross, or when they should have discovered it by the exercise of due diligence. Consequently, it cannot be determined as a matter of law that the statute of limitations has run against the Hofers solely on the allegations in their second amended complaint. Therefore, the trial court erred in dismissing this complaint on the basis of the statute of limitations. Green v. Bartel, 365 So.2d 785 (Fla. 3d DCA 1978). See also Daytona Development Corp. v. McFarland, 454 So.2d 761 (Fla. 2d DCA 1984), petition for review denied, 462 So.2d 1107 (Fla. 1985); Smith v. Hussey, 363 So.2d 1138 (Fla. 2d DCA 1978).
Accordingly, we reverse and remand for reinstatement of the Hofers' second amended complaint.
CAMPBELL and SCHOONOVER, JJ., concur.
