Skip to content
Snippets Groups Projects
Commit 0a7f35b6 authored by Jared Hancock's avatar Jared Hancock
Browse files

forms: Properly display staff/user field requirement

parent 9c9bfae1
No related branches found
No related tags found
No related merge requests found
......@@ -429,11 +429,18 @@ class DynamicFormField extends VerySimpleModel {
}
function getField($cache=true) {
global $thisstaff;
if (!$cache)
return new FormField($this->ht);
// Finagle the `required` flag for the FormField instance
$ht = $this->ht;
$ht['required'] = ($thisstaff) ? $this->isRequiredForStaff()
: $this->isRequiredForUsers();
if (!isset($this->_field))
$this->_field = new FormField($this->ht);
$this->_field = new FormField($ht);
return $this->_field;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment