Comments (9)
In our app we have a similar feature, the difference is that we didn't add the error messaging to the form fields because it would mean that the layout would change and this could be problematic since you could be typing the currently focused field would jump to a different position, bothering the user.
The way we solved this issue was by having an "error indicator" in the toolbar with a table view that will list all the validation errors, tapping one validation error would focus the current form field. Something like this:
from form.
Thanks @3lvis that's a good idea.
I would try that, but my concern is that I want to be able to see the validation errors when the keyboard is showing because that's when the user is fixing the validation issues and I feel that they'd like to see the validation errors then. I'm worried that the keyboard would cover the validation error popover ... and on iPhone I don't have access to UIPopover.
I hear your point about the layout potentially changing if I show the validation error inline with the title.
I'm not sure what to do ... any ideas? Thanks again! :-)
from form.
On an iPhone, you could probably use a UIAlertController or a custom modal screen. Adding inline validation error might be more work than it sounds, or do you have some suggestions on how we could do this without messing up with the layout?
Another option is to use the "info" field in the form field, this info field shows a small pop up when the user focuses on the field.
from form.
Another reason for why only displaying the validation errors inline might be a bad idea is because if it's a long form and the fields that are failing are off-screen the user basically has to scan the entire thing to figure out why things aren't working, this is not a problem if you have a toolbar or a floating indicator of issues.
from form.
@3lvis the info field works pretty well. I have to add newlines to make it occupy several lines but I can use that, thanks!
I suppose I could add the info fields only in the case of validation failures if I don't want to always show them? I'm not sure if showing the info field would be distracting to people that fill out the field repetitively and know the constraints on values from past experience. Thoughts?
Thanks again!
from form.
The info popup seems to be limited to about 3 lines of text on an iPhone 6. Is there an option to adjust the popup height?
Also, I'd like to modify the keyboard type of some fields (i.e. to turn off spelling suggestions, etc) and I'm not sure how to access the keyboard.
Sorry for all the questions ...
Cheers!
from form.
It looks like the info popover appears on the wrong field in some cases. For example, here, I'm editing in the second (middle tags field) but the info popover hangs off of the third (rightmost tags field). Any ideas?
It seems to depend on the width of the popover's text though. If I shorten 123456789 to say 123, then the popover hangs off of the correct middle tags field.
from form.
The fact that the info bubble appears in a different form field seems like a bug. Might be nice to isolate in order to figure out a fix.
from form.
Regarding modifying the keyboard you have to use the form fields' input_type
. These are the available mappings: https://github.com/hyperoslo/Form/blob/efde99850ce61586d8ce28c3a4c4875c7d637498/Source/Cells/Views/FORMTextField.m#L188-L219
And this is how each input type is configured. https://github.com/hyperoslo/Form/blob/2c7bae694f143ceb7f37196c48d9f02c2f9e2cbf/Source/Cells/Views/FORMTextFieldTypeManager.m
from form.
Related Issues (20)
- Feature Request: Consider adding standard UITextView field type HOT 1
- Feature Request: Allow custom input validator HOT 8
- How does one subscribe a custom cell's FORMBaseFieldDelegate to the conforming class FORMDataSource? HOT 1
- Use case difference between Sections and Fields HOT 5
- Dynamic Buttons HOT 3
- [Question] How does your GroupHeaders keep track of their collapsed state upon dequeue? HOT 8
- How to create form templates which creates JSON? HOT 11
- Do the Form support multiple checkboxes? HOT 5
- Add tests for Hidden field order #571
- How do I choose id for each element? HOT 1
- NSInternalInconsistency exception when attempting to process FORMTarget HOT 1
- Swift Syntax Error HOT 1
- FORMFieldValuesTableViewController navigation bar title color change
- Segment get unselected when combined with Show target HOT 2
- Show/Hide group HOT 7
- Memory leaks in demo project (and so in projects using the lib)
- Potential memory leaks in Model layer
- View transition bug when keyboard show, only in iOS 11 HOT 7
- Multiselect support HOT 5
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 form.