- Issue created by @johnv
- Status changed to Fixed
about 1 year ago 9:23pm 7 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.
In the attempt to move code into Object oriented fashion, it is discovered that processing the elements from the Office Hours Form, can use the $item object, instead of the $item->GetValue() values array.
This way, less code is needed, using subclassing.
edit a form, save a form.
The Widget must set
@@ -155,7 +155,7 @@ class OfficeHoursTYPEWidget extends OfficeHoursWidgetBase {
$elements[] = [
- '#default_value' => $default_value,
+ '#default_value' => $item,
'#day_index' => $day_index,
'#day_delta' => $day_delta,
// Add field settings, for usage in each Element.
Fixed
1.12
Code - widget
Automatically closed - issue fixed for 2 weeks with no activity.