Hi - that is incorrect. Browser forms can have code. Office 365 browser forms can have code. However - your form can't be full trust, since it can't be admin approved. It has to go in the Sandbox and be able to be published directly to a form library. https://support.office.com/en-SG/Article/Publish-a-form-bd6eb030-b26b-4774-b22b-7c80e0089403#__toc262226389 is for SharePoint 2010, but still valid.
Hilary Stoupa
