When there are a lot of SubmittedForm records the UserDefinedForm
page takes a long time to load in the CMS, and oftens exceeds
the PHP memory limit well beyond 128M.
Previously UserDefinedForm::getCMSFields() would build a list of
name => value from all SubmittedFormField records, but it would
do this twice, once in getCMSFields() and another time in
UserFormsGridFieldFilterHeader. It would also use the full ORM
to build this list, when all it needs is a map of the Name
and Value columns.
This fixes that to build the columns once in getCMSFields() using
DB::query() and it'll pass those columns along to
UserFormsGridFieldFilterHeader as well so it doesn't do it twice.
If you had a EditableFileField in your userform, the submission table in
the CMS would just say "Array" rather than link to the file, making it fairly
useless
Reverts "MINOR Removed the country dropdown field due to the framework
has removed the CountryDropdownField"
This reverts commit cbe1dce4ff08476a19e4bdea9d12da4e6cd55ad0.
Framework has not, in fact, removed CountryDropdownField. This commit
restores the EditableCountryDropdownField class.
- Changed configurable static variables to private as per recent API updates to 3.1
- Use of statics as configurable variables replaced with config api usage
- Make statics private
- Use Config::get rather than eval to read private statics
- Add a helper function to expose UserDefinedForm_EmailRecipient::$summary_fields
(to make them available for i18n).
Implementation of the rules required that a dependent field could only rely on one implementation. This patch joins all those dependencies together in one function to exclude. Tests / a rewrite of this behavior is on the horizon.
The specific situation this is fixing is that when server-side
validation fails and results in form having non-default values. In this
case the visibility might not be correct and will need to be updated.
Also, we cannot rely on onclick events on radio group to find out the
current value when we are loading - instead we need to actually find
out the currently selected radio button.
Fixes the IsBlank and IsNotBlank conditions as well.