Code Monkey home page Code Monkey logo

Comments (2)

ihabsoliman avatar ihabsoliman commented on July 18, 2024

That's something for your build, you can fork it for your self, I am
keeping this one clear from any client requirements just a base anyone can
use

Sent from nexus4
On Apr 8, 2014 11:38 PM, "tomByrer" [email protected] wrote:

I'm using a lib https://github.com/maxatwork/form2js that needs
dot.nested.objects name attributes. But dot.notation makes bad CSS ID
selectors (I could \ escape http://jsbin.com/mimey/1/edit the CSS, but
I don't want to torture the poor PhotoShop choppers ;).

I tried to remove the dots https://github.com/blakeembrey/camel-casebut couldn't hack in the code :/ So I separated
name from id:

  "id": {
    "label": "ID",
    "type": "input",
    "value": "filebutton"
  },
  "name": {
    "label": "Name",
    "type": "input",
    "value": "name.val"
  },

Works so far, but I hacked the JSON & not YAML, plus all the default
values for name is "name.val". I can PR after yours if you wish.

Improvements: on a fully default component template, editing ID, Name, or
Label Text will auto-fill the other 2.

Reply to this email directly or view it on GitHubhttps://github.com//issues/8
.

from bootstrap-form-builder.

tomByrer avatar tomByrer commented on July 18, 2024

That's not really a "client" requirement, that's a CSS requirement. CSS (thus the id HTML attribute) can't have anything but alphanumeric, - & _. Also spaces are bad.

I'm open to other ways to ensure the ID is CSS-friendly, like removing spaces & changing . to _ with a lib like camel-case

Edit: changed topic to reflect the real issue.

from bootstrap-form-builder.

Related Issues (10)

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.