I am using the Eureka Swift form library found here.
I have a textfield and whenever you start typing in it, I would like the other sections of the form to be hidden. I started out by just trying to hide 1 section but nothing happens when I start typing in the field. My code is as follows:
form +++ Section("Device Search")
<<< IntRow()
{
$0.title = "Asset Tag"
$0.placeholder = "Enter Asset Tag #"
}
.onChange { row in
self.form.sectionBy(tag: "iOS Version")?.hidden = true
}
+++ Section("iOS Version")
for version in countArray
{
form.last! <<< CheckRow()
{
$0.title = version
$0.tag = $0.title
}
}
Also, is there a way to use an IntRow but remove the formatter for just the row?
About your second question is there a way to use an IntRow but remove the formatter for just the row?
Add this line
$0.formatter = nil
just below this one$0.placeholder = "Enter Asset Tag #"
Your first question, how hide a
section
inEurekaForm
, first of all your section initialisation is not what you think it is, I will explain myself, you think that you are initalizating your section with tag, but in section definition none of init methods usetag
as parameter so to get the correct section you need change your section initialization for this oneafter that you need to modify this
by this one
After that your header named "iOS Version" is hidden after you write any number on your
IntRow
Full Code