0

I have created a form with FXForms which contains a switch input and a text field input.

I've been trying to workout how to make the text field only visible if the switch statement is true, but with no success and can't find anything in the documentation.

What would be the best way to achieve this?

jdawg
  • 508
  • 2
  • 5
  • 18

1 Answers1

0

I added a FXFormFieldAction to the switch field, which calls a function containing

self.formController.form = self.formController.form
self.tableView.reloadData()

Then within the func fields() -> [AnyObject]! { function, I create an NSMutableArray to which I can conditionally add fields to before returning.

This solution works great, the only thing I am lacking is the ability to make the change in fields animated.

jdawg
  • 508
  • 2
  • 5
  • 18