(a) On the confession of the defendant, with the assent of the plaintiff of his attorney, judgment may be given against the defendant in any action, before or after answer, for any amount or relief not exceeding or different from that demanded in the complaint.
(b) When the action is against a public corporation or a private corporation, the confession shall be made by the person who at the time sustains the relation to such corporation as would authorize the service of a summons upon him. In all other cases the confession shall be made by the defendant in person.
(c) When the action is upon a contract, and against one or more defendants jointly liable, judgment may be given on the confession of one or more defendants against all the defendants thus jointly liable, whether such defendants have been served with the summons or not, to be enforced only against their joint property and against the joint and separate property of the defendant making the confession.
(d) The confession and assent thereto shall be in writing, and subscribed by the parties or their attorneys making the same, and acknowledged by each before an officer authorized to take acknowledgments of deeds, but the acknowledgment is not required if the parties or their attorney appear in court when the judgment is given. In all cases the confession and assent thereto and the acknowledgment, if any, shall be filed with the clerk.