GithubHelp home page GithubHelp logo

Dynamic label links about jquery.dform HOT 2 CLOSED

daffl avatar daffl commented on July 29, 2024
Dynamic label links

from jquery.dform.

Comments (2)

daffl avatar daffl commented on July 29, 2024

It might be. We could just add a type that generates an id based on the name (if there is no id).
Labels should be already linked when you give your input field an id explicitly though.

from jquery.dform.

lahdekorpi avatar lahdekorpi commented on July 29, 2024

Yes, those ones (like the username field on the first demo) work just fine.
I've had similar situations where the id's needed to generated dynamically.

The one thing to take into account is that they need to be unique on the whole document and we can't be sure about what id's are already present on the DOM nor what are being generated by other scripts.
Also, if there are multiple dform generated ones...

So a namespace with a global counter could work? Something like id="dform-{{name}}-{{i}}"

from jquery.dform.

Related Issues (20)

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.