(a) Whenever any party or parties to a civil action, or his or their attorney, desires to file any pleading or amendment to any pleading which might properly be filed except for the fact that according to the rules of court the time within which the pleading or amendment may be filed has passed, the pleading or amendment may be filed with the clerk of the court, without an order of the court and without penalty, if the party or parties, or his or their attorney, obtains the written consent of the adverse party or parties or his or their attorney to the filing.(b) Upon the filing of the written consent and the pleading or amendment with the clerk of the court, the pleading or amendment shall become in all respects a proper pleading for the consideration of the court, as though filed within the time prescribed by the rules of court.