How to add a condition into an existing form?