0

How can I get actual value of field which user is selected in field,

In this method I got only number of index which user selected, but I need the value (string) of that.

(void)submitRegistrationForm:(UITableViewCell *)cell
{
//we can lookup the form from the cell if we want, like this:
RegistrationForm *form = cell.field.form;

NSLog(@"Country : %d",form.selectYourCountry);

// How to get country name over here.

}

Thanks,

Bhavesh Dhaduk
  • 1,888
  • 15
  • 30

1 Answers1

0

I had the same issue, got confused about how to get the values in the FXForms, then after reading the comments in the DynamicForm class, posting the solution for anyone else who faces the issue in future

-(void)submitRegistrationForm:(id)sender
{
    NSLog(@"Form Submitted");
    DynamicForm *form=self.formController.form;
    NSDictionary *values=form.valuesByKey;

    NSLog(@"values:- %@",values);

}

ps: my self is a subclass of FXFormViewController

Bonnie
  • 4,943
  • 30
  • 34