Button Doesn't Appear
Hoping this is something silly on my part.
I'm setting up a login form with a button at the bottom of the form. The button does not appear.
class LoginScreen < PM::XLFormScreen
title "Login Screen"
form_options required: :asterisks, # add an asterisk to required fields
# on_save: :save_the_form, # will be called when you touch save
on_cancel: :cancel_form, # will be called when you touch cancel
auto_focus: true # the form will focus on the first focusable field
def form_data
[
{title: 'Login',
cells: [
{ title: "Username",
name: :username,
type: :text,
placeholder: "Username",
required: true },
{ title: "Password",
name: :password,
type: :password,
placeholder: "Password",
required: true },
{ title: "Login Here",
name: :login,
type: :button,
on_click: -> (cell){ save_the_form(values) }
}
]
}
]
end
def save_the_form(values)
mp values
end
end
Any help is appreciated. Thanks!
i got same issue. the button is appeared, but the text didn't show up and on_click event didn't fired.
probably the problem is the current version of XL-Form cocoapod is 3.1.1 had some issue, i was able to use this gem before with XL-Form 3.1.0.
so, i fork this repo and replace Gemfile, u can use it until this issue solved.
gem 'ProMotion-XLForm', github: 'apinrdw/ProMotion-XLForm', branch: 'fix-version'
That fixed it. Thanks so much!
@apinrdw Is using the latest PM-XLForm fix the issue ?
Hey, guys. Any joy to get this issue fixed. I used @apinrdw advice as a reference. But still facing the same issue. onclick event is not fired. Thanks in advance
@bmichotte , yeah using latest version fix this issue. Thanks.