We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2f8e71a + 9c7e322 commit dbf6d0eCopy full SHA for dbf6d0e
src/Form/Control/Callbacks/RecalculateCallback.php
@@ -32,6 +32,10 @@ final class RecalculateCallback {
32
* sill can perform recalculation.
33
*/
34
public static function addAjaxCommands(AjaxResponse $response, FormStateInterface $formState): void {
35
+ // Even though the triggering element has #limit_validation_errors set to []
36
+ // form state might contain errors, e.g. if a no radio button of a required
37
+ // radios element was selected.
38
+ $formState->clearErrors();
39
/** @var \Drupal\json_forms\Form\AbstractJsonFormsForm $formObject */
40
$formObject = $formState->getFormObject();
41
$newData = FieldNameUtil::toFormData($formObject->calculateData($formState));
0 commit comments