I added the logic for forms.