Comments (5)
Hmm not totally clear on what you're looking for =\ Maybe an example of the API you're looking for? I know you tried to explain it, but it's not clicking with me right now
The submit button isn't required or even added by default; in a FormController or FormableController subclass, just set the submit
callback and add a place where that's triggered:
def viewDidLoad
super
self.form.on_submit do
self.submit
end
# Custom UI for submitting a form
self.navigationItem.rightBarButtonItem = UIBarButtonItem.alloc.initWithBarButtonSystemItem(UIBarButtonSystemItemSave, target:self, action:'submit')
end
def submit
data = self.form.render
# do something with data
end
from formotion.
Gotcha, I appreciate your help. I'll just simplify what I was looking for (the root of this) and hopefully you can see what I was I'm saying.
Simply put, example FormModel data persists, and example KitchenSink data doesn't.
If there was a property on KitchenSink, when flipped would make the data persist, I would have what I wanted. Does that help?
FormModel, is a model automagically building a view. I'm looking for formotion's easlily buildable views (KitchenSink) to automagically build a model. Maybe I'm off in thinking that's the purpose of the methods of building provided.
from formotion.
It appears I'm completely wrong. I could have SWORN that FormModel example maintained the data for you. I guess the app was still live in the background. My mistake, please disregard most of what I said.
I still think it would be great if formotion was able to maintain state for you, but everything else above is just flat wrong.
from formotion.
Ahh okay, didn't realize that's what you meant by persist. Yeah in the future that could be neat, especially for models. Pull requests are always welcome!
from formotion.
Soon as I implement it in my current project, I'll def make an effort to add it with a pull request. Thanks for listening to my confusion :)
from formotion.
Related Issues (20)
- Is there a way to change the font color for title text? HOT 1
- Not able to run a project with formotion HOT 1
- color of a text field HOT 2
- Updating runtime dependency for motion-require HOT 1
- How to call reload_data on a form? HOT 2
- 'willDisplayCell' delegate method not called HOT 1
- Observe to update after a change in a form field HOT 2
- Formotion panel sometimes does not display until tap or scroll registered HOT 2
- form.render returning an empty hash HOT 3
- Styling Submit button HOT 1
- Change caret / tint color HOT 2
- Options row causes crash in specific cases
- Picker broken for ios8? HOT 1
- subform row crashes HOT 1
- How to dynamically assign rows to Formotion table
- Specific dates cannot be selected HOT 2
- How to get UIView object for a row HOT 1
- Subforms with multiple views per page HOT 2
- Picker items updating text on_change but not value in form HOT 3
- Cyclical dependencies and `motion_require`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formotion.