Set transient length properly and use in form