Form error label is not dissapearing
If form has an error, sometimes the error does not dissapear even after i change value and submit form again:
This is observed on Calendar controls.
Fomantic-UI calendar module prevent the input field from catching the regular change event we normally use for removing error prompt. Therefore manually setting onChange handler to remove error prompt is need here for Calendar field.
$date_time = $f->getField('date_time');
$date_time->setOption('onChange', new jsFunction([$f->js()->form('remove prompt', $date_time->short_name)]));
Can this be implemented in Calendar field decorator class?
Can this be implemented in Calendar field decorator class?
It could but what if you need you own specific onChange handler?
Yeah that's not good then.
any workarounds ever come around for this issue? I am not as savvy in JS at this integrated level - i cannot get the calendar workaround to work for FormField Upload.. to me it would be natural in the Upload case to clear the error with the onDelete event at least.. i tried in onDelete: ''' return new \atk4\ui\jsFunction([$form->js()->form('remove prompt', 'file_field_name')]); ''' but that gives me JS Error Message (Function Statement requires a function name) so I am guessing i am missing a few things..
@PhilippGrashoff helped me with a solution workaround specifically to Upload - in onDelete:
return $form->js()->form('remove prompt', 'file_field_name');
Blocked by https://github.com/atk4/ui/pull/869
@DarkSide666 still valid?
@ibelar Can you please check this sometime ?
no response, please reply if the problem is still present