infinitered / ProMotion-form

Deprecated -- use ProMotion-XLForm
19 stars 11 forks source link

Multi-select options without bitfield? #20

Closed DiogoAndre closed 9 years ago

DiogoAndre commented 10 years ago

I tried to figure it out myself, but just kept hitting a wall. How can we have e field to be a multi-selectable options list without setting the type as :bitfield

It is possible with FXForms:


             // RegistrationForm.h
             @property (nonatomic, copy) NSArray *interests;

             // RegistrationForm.m
             //this is a multi-select options field - FXForms knows this because the
             //class of the field property is a collection (in this case, NSArray)

             @{FXFormFieldKey: @"interests",
               FXFormFieldDefaultValue: @[@"Videogames"],
               FXFormFieldOptions: @[@"Videogames", @"Animals", @"Cooking"]},

Maybe not possible at all because of how the form_data is transformed into a struct?

Thanks!

jamonholmgren commented 10 years ago

Hey Diogo! I don't have time to look into this right now but this should definitely be possible. I'll see if one of my devs can help out.

DiogoAndre commented 10 years ago

Hi Jamon! No big deal, I ended up going the bitfield way for now. Many thanks!

jamonholmgren commented 9 years ago

ProMotion-form has been officially deprecated. Thanks everyone!

http://jamonholmgren.com/deprecating-promotion-form/