Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Doesn't Appear #40

Open
ricsrock opened this issue Feb 18, 2016 · 5 comments
Open

Button Doesn't Appear #40

ricsrock opened this issue Feb 18, 2016 · 5 comments

Comments

@ricsrock
Copy link

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!

@apinrdw
Copy link

apinrdw commented Feb 19, 2016

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'

@ricsrock
Copy link
Author

That fixed it. Thanks so much!

@bmichotte
Copy link
Owner

@apinrdw Is using the latest PM-XLForm fix the issue ?

@baramik
Copy link

baramik commented Mar 3, 2016

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

@apinrdw
Copy link

apinrdw commented May 21, 2016

@bmichotte , yeah using latest version fix this issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants