nicklockwood / FXForms

[DEPRECATED]
Other
2.93k stars 339 forks source link

CoreData with FXFormFieldOptions display empty cell #457

Closed AsKaeternam closed 7 years ago

AsKaeternam commented 8 years ago

Hello,

I'm using FXFormFieldType:FXFormFieldTypeOption to display a list of all my partners and allow the user to select them.

NSMutableArray * dataRows = [Partners SQPFetchAll];

return @{FXFormFieldInline: @NO, FXFormFieldTemplate: @{
                 FXFormFieldOptions: dataRows,
                 FXFormFieldType:FXFormFieldTypeOption
                 }
         };

My objects are entities with an ID and I've used fieldDescription to only display the name in the list.

The first time the FXForm is well saved. but the second time the cells for entity are empty.

These are my steps :

Open FormController Select "Partner" Click on "Add item" Select a partner in the list Save the Form.

The first time, it's working fine, the partner cell display the name of the partner and the subform also display the line with the name of selected partners.

Then, When I reopen the Form, In the Partner cell if have the name of the previous selected partner but in the subform, I've one line but the cell is empty.

It's seems that the value is null for the subform.

This is two screens with an example for the field Group for the model entity Group :

screen shot 2016-08-31 at 13 47 49

screen shot 2016-08-31 at 13 47 58

Do you know how can I fix that ?