Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix datatable FormWidget unable to return save data
f8459b4 broke the DataTable FormWidget as the formwidget previously processed data in the POST request in the form of "{fieldName}TableData[rowIndex]". This caused the referenced commit to skip over the datatable formwidget when processing the save data as it was not able to detect any data present in the request. The TableData suffix was a holdover from the initial implementation of the Table widget a decade ago (c6eb544#diff-7c9bd4a62da5eb18d69a023cb1d7d8c04dd2958466c5a707b0c3901e4fd28cc6R554) when originally the POST data was sent using the widget's alias as its key (as the alias was set to the value of the field name). A later commit introduced a dedicated option for the fieldName (e9c7e6b), but retained the TableData suffix. The suffix is not required, and this not only solves the current issue of the DataTable FormWidget not returning its values through the Form's getSaveData() method but also makes the request payload make more sense in general.
- Loading branch information