mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
c0a30f1b6a
* FIX unrequire fields when they become dataless When fields that collect input data are changed in configuration via the CMS to become fields that no longer collect input data (e.g. TextField -> HTML Block), submitting the resulting form results in a fatal error, server 500 response, etc. due to trying to check if a field without data (ever) has data in it. To circumvent this we can set the required state to false if the field is being converted to one that does not collect data (which FormField API conveniently provides a check for). * Move parent::onBeforeWrite() to top of function Co-authored-by: Steve Boyd <emteknetnz@gmail.com> |
||
---|---|---|
.. | ||
Control | ||
Extension | ||
Form | ||
FormField | ||
Model | ||
Modifier | ||
Task | ||
UserForm.php |