diff --git a/src/view/form/AphrontFormView.php b/src/view/form/AphrontFormView.php --- a/src/view/form/AphrontFormView.php +++ b/src/view/form/AphrontFormView.php @@ -92,6 +92,10 @@ } public function buildLayoutView() { + foreach ($this->controls as $control) { + $control->setUser($this->getUser()); + } + return id(new PHUIFormLayoutView()) ->setFullWidth($this->getFullWidth()) ->appendChild($this->renderDataInputs()) @@ -118,10 +122,6 @@ public function render() { require_celerity_resource('phui-form-view-css'); - foreach ($this->controls as $control) { - $control->setUser($this->getUser()); - } - $layout = $this->buildLayoutView(); if (!$this->user) {