The opinion of the court was delivered by
Wells, J.:This action was originally brought in the district court of Rooks county by the plaintiff in *412error against the defendants in error. In his petition, he substantially asserts ownership and right of possession of certain notes and mortgages therein described, and alleges that he allowed the defendant Farr to deposit said notes and mortgages with the defendant the Exchange Bank of Stockton to secure the nóte of the defendants Felix Smith and Geo. O. Farr for $959.50, falling due May 15, 1895. He avers that h.e believes the fact to be that, by agreement between said bank and said Smith and Farr, the bank received from Smith and Farr certain other mortgage security and the payment of interest, and in consideration thereof extended the time for the payment of their note several times, by reason whereof said bank lost its right to. plaintiff’s notes and mortgages. He therefore prays a disclosure of the facts by the defendants, and if it be found that said note of Smith and Farr has been extended, that the plaintiff’s notes and mortga.ges be returned to him ; but if the court should find that said note has not been extended, then that the court render judgment in his favor, for the use of the bank, against Smith and Farr, for the amount due on their note to the bank, and foreclose the mortgage last given by them as security therefor, and that plaintiff have return of his notes and mortgages, and all other equitable relief.
To this petition the defendants demurred, on the grounds that several causes of action were improperly joined and that the petition did not state facts sufficient to constitute a cause of action. This demurrer was sustained on both grounds as to all the deifendants except the bank, and was sustained in favor of the bank on the first ground and overruled as to the second. Thereupon the action was dismissed by the court as to all the defendants except the bank, and the *413plaintiff was required' to elect whether he would proceed in equity or at law as in replevin, and, duly objecting to such order, the plaintiff elected to adopt the latter course. In this there was error. The petition stated a cause of action, and but one. If the allegations of the petition were true, and by reason of extensions the surety had been released, then the plaintiff was entitled to a restitution of his property ; but if the surety had not been released and the other allegations of the petition were true, then the plaintiff was entitled to have the matter closed up, the security of the principal debtors exhausted, the balance made from his security, and the remainder turned back to him. And in this Smith and Parr were necessary parties.
In relation to the order of the court compelling plaintiff to elect a name for his cause of action, we quote from the language of Mahan, P. J., in Freeman v. Trickett, 6 Kan. App. 84, 49 Pac. 672:
“ Our code of civil procedure has abolished all forms of actions, and has declared that there shall be but one form of action, which shall be called a civil action. It provides that the plaintiff shall state the facts constituting his cause of action concisely, without repetition, and it then becomes the duty of the court to say whether or not it states a cause of action, and to what relief the plaintiff is entitled ; but it is unnecessary to say whether it would have been called at common law by this, that or the other name. The court simply has to determine whether the rights of the plaintiff have been violated by the acts of the defendant, and if so, what the plaintiff's measure of recovery is.”
It is not necessary to consider the other allegations of error. The judgment is reversed, and the case remanded with direction to grant a new trial and to overrule the demurrer to the petition.