GithubHelp home page GithubHelp logo

allyjweir / chameleonforms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrcollective/chameleonforms

0.0 1.0 0.0 3.94 MB

Shape-shifting your forms experience in ASP.NET MVC

License: MIT License

Pascal 0.25% C# 76.72% CSS 0.98% ASP 0.02% JavaScript 16.57% HTML 5.47%

chameleonforms's Introduction

ChameleonForms

Chameleon Forms logo

This library will shape-shift your forms experience in ASP.NET MVC.

ChameleonForms takes away the pain and repetition of building forms with ASP.NET MVC by following a philosophy of:

  • Model-driven defaults (e.g. enum is drop-down, [DataType(DataType.Password)] is password textbox)
  • Extensible and flexible core - you can extend or completely change anything you want at any layer of ChameleonForms and you can drop out to plain HTML at any point in your form for those moments where pre-prepared field types and templates just don't cut it
  • Beautiful, terse, fluent APIs - it's a pleasure to read and write the code
  • DRY up your forms - your forms will be quicker to write and easier to maintain and you won't get stuck writing the same form boilerplate markup form after form after form
  • Consistent - consistency of the API and form structure within your forms and consistency across all forms in your site via templating
  • Declarative syntax - specify how the form is structured rather than the HTML output of the form; this, in combination with the aforementioned templating means that when it comes time to change the style of your site and/or HTML structure of your forms you can do so as painlessly as possible (think about a scenario where you rapidly prototype a new site using Twitter Bootstrap and you make it big and need to change to a custom design!)

ChameleonForms has built-in support for building forms using Twitter Bootstrap 3! Get rid of all the boilerplate code you have to write around every field and instead use code like below. Clone the repository and fire up the example project to see what we mean!

So what does a ChameleonForms form look like? Here is a (very) basic example:

@using (var f = Html.BeginChameleonForm()) {
    using (var s = f.BeginSection("Signup for an account")) {
        @s.FieldFor(m => m.FirstName)
        @s.FieldFor(m => m.LastName)
        @s.FieldFor(m => m.Mobile).Placeholder("04XX XXX XXX")
        @s.FieldFor(m => m.LicenseAgreement).InlineLabel("I agree to the terms and conditions")
    }
    using (var n = f.BeginNavigation()) {
        @n.Submit("Create")
    }
}

Find out more about why we created ChameleonForms and the advantages it gives you.

The CI Server for this project is hosted at http://ci.robdmoore.id.au:8010/. It is hosted using a free license of TeamCity Enterprise thanks to the generous supprot of Jetbrains.

Installing ChameleonForms

ChameleonForms is available via NuGet.

Install-Package ChameleonForms

Contributors

Core Team

Documentation

Check out the wiki.

Continuous Integration

We have a continuous integration build that automatically builds and runs tests when we push/merge to master and generates the NuGet packages that we can publish to NuGet.org at the click of a button.

Contributing

If you would like to contribute to this project then feel free to communicate with us via Twitter @robdmoore / @mdaviesnet or alternatively send a pull request / issue to this GitHub project.

Roadmap

Feel free to check out our Trello board. It gives some idea as to the eventual goals we have for the project and the current backlog we are working against. Beware that it's pretty rough around the edges at the moment.

Logo by Jason Roberts

chameleonforms's People

Contributors

fsateler avatar jason-roberts avatar jtheisen avatar mattdavies avatar robdmoore avatar royce avatar travisthetechie avatar zabulus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.