xmartlabs / XLForm

XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C.
MIT License
5.77k stars 953 forks source link

Values of Rows with XLFormRowDescriptorTypeSelectorPush are not showing up in form.formValues #1052

Open kpavankotesh opened 5 years ago

kpavankotesh commented 5 years ago

Hi,

I recently updated to 4.0.1 and the rows with XLFormRowDescriptorTypeSelectorPush, valueTransformers

row = XLFormRowDescriptor(tag: "tag", rowType: XLFormRowDescriptorTypeSelectorPush, title: "title")
row.valueTransformer = CustomValueTransformer.self

Values of such rows are not coming up in form.formValues on submit. When I revert back to 4.0.0 it works fine. Can you please check?

Note: I upgraded it as a part of Swift 5 migration. Please check if that could be the issue.

chrisballinger commented 5 years ago

I am also seeing a similar, possibly related issue where form.formValues does not return custom objects unless they conform to XLFormOptionObject.

See the code here: https://github.com/xmartlabs/XLForm/blob/master/XLForm/XL/Helpers/NSObject+XLFormAdditions.m#L43