[WIP] Form manager implementation

Based on #4283