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

Feature: Number input field #188

Merged
merged 2 commits into from
Jul 12, 2016
Merged

Feature: Number input field #188

merged 2 commits into from
Jul 12, 2016

Conversation

kevinchappell
Copy link
Owner

@kevinchappell kevinchappell commented Jul 12, 2016

More browsers are supporting the html5 number input. For this reason the number input is being added to formBuilder but since there are still backward compatibility issues, it is disabled by default.

To enable, remove 'number' the field from the disabledFields option.

number-input

Resolves #185

@jonrcable
Copy link
Contributor

jonrcable commented Jul 12, 2016

on point! I literally just started checking this out yesterday replacing an existing lib that doesn't work nearly as well. One of the things missing was the HTML5 number element, this couldn't have been better timing, so high five! One question, is it possible to get a tutorial on how to add additional elements, I was able to modify it enough to remove what I didn't need, like className and roles, I actually just merged my diffs to the numbers release in under a few mins. I will be trying to add a few additional (custom) fields at some point (APIs) in the future, a basic tutorial on adding elements would be very dope! cheers! very easy to follow logic, I like it Thanks for the hard work, let me know how I can help

@kevinchappell kevinchappell force-pushed the feature/number-field branch from 8947419 to 9fa1005 Compare July 12, 2016 21:47
@kevinchappell
Copy link
Owner Author

@jonrcable A tutorial would certainly help in extending formBuilder however most fields not included will have their own special needs and the tutorial may serve as a code tour at best. Unfortunately formBuilder wasn't created with extensibility in mind, Formeo however was but is still in early stages of development. For example adding a number element in Formeo would simply be this:

{
  tag: 'input',
  attrs: {
    type: 'number',
    min: '',
    max: ''
  }
}

Regardless I can try to put together a tutorial one of these days. Do you have a field type in mind?

@kevinchappell kevinchappell merged commit 30c40ea into master Jul 12, 2016
@kevinchappell kevinchappell deleted the feature/number-field branch July 12, 2016 22:05
kevinchappell added a commit that referenced this pull request Jul 12, 2016
* Add number input field

* Make number input disabled by default
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

Successfully merging this pull request may close these issues.

2 participants