Extend form with onBeforeRender callback