Most form helpers can automatically pick up previous input values and will show them as default. You can also use param to set them manually and let necessary attributes always be generated automatically.