Cannot clear text from fields of sections that don't have focus

13 views
Skip to first unread message

pulkitsinghal

unread,
Nov 6, 2012, 3:53:35 PM11/6/12
to ibaf...@googlegroups.com
I have two sections, each with text fields.

If i have the user click a button and try to programatically reset these fields to empty values:

            // Clear the input from the text fields of all sections
            for (IBAFormSection *section in self.formDataSource.sections) {
                for (id formField in section.formFields) {
                    if([formField isKindOfClass:[IBATextFormField class]]) {
                        ((IBATextFormField*)formField).textFormFieldCell.textField.text = @"";
                    }
                }
            }


The only time that the fields in the first section will get cleared is if it had focus.
https://github.com/ittybittydude/IBAForms/issues/27

Should I be trying to update the underlying datasource model too somehow?

pulkitsinghal

unread,
Nov 12, 2012, 9:04:14 PM11/12/12
to ibaf...@googlegroups.com

Should I be trying to update the underlying datasource model too somehow?

Clearing the datasource fields by removing them explicitly from the model NSMutableDictionary helped.
Reply all
Reply to author
Forward
0 new messages