GithubHelp home page GithubHelp logo

tristandenyer / clone-section-of-form-es6-or-jquery Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 51.0 215 KB

Now on npm. Using vanilla JavaScript (ES6) or jQuery to duplicate a section of a form, maintaining accessibility (a11y).

License: MIT License

CSS 12.04% HTML 63.57% JavaScript 24.39%
bootstrap-4 demo es6 es6-javascript forms html javascript jquery

clone-section-of-form-es6-or-jquery's People

Contributors

tdenyer avatar tristandenyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clone-section-of-form-es6-or-jquery's Issues

IE 9

Hi Tristan,

I have some difficulties with jQuery in IE9. Is there an way to make the clone section working on IE9?

Kind regards

how can i format the data that is submitted through ur plugin???

i just stucked and cant get any idea how too do it.

Source array:

  ["data"] => array(10) {
      ["type"] => string(10) "controller"
      ["name"] => string(3) "eg1"
      ["description"] => string(5) "desc1"
      ["type2"] => string(8) "function"
      ["name2"] => string(2) "c2"
      ["controller2"] => string(4) "welcome"
      ["description2"] => string(6) "desc 2"
      ["type3"] => string(10) "controller"
      ["name3"] => string(2) "c3"
      ["description3"] => string(8) "c3 descr"
    }

from the above array how can i get new array like:

   array(
     array(
       'type' => 'controller',
       'name' => 'eg1',
       'description' => 'desc1'
     ),
      array(
       'type' => 'function',
       'controller' => 'welcome',
       'name' => 'c2',
       'description' => 'desc 2'
     ),
     array(
       'type' => 'controller',
       'name' => 'eg1',
       'description' => 'desc1'
     ),
     array(
       'type' => 'controller',
       'name' => 'c3',
       'description' => 'c3 descr'
     )
   );

data is submitted through a https://github.com/tristandenyer/Clone-section-of-form-using-jQuery

thanks for help

Form Fields wrapped in multiple divs

Hi,
this is really nice, but I have one issue.
my form fields are wrapped in multiple divs, how do I copy the same structure, for example.

<div class="onoffclass">
        <label for="recipeqty" class="col col-lg-1 control-label">Quantity:<sup>&#42;</sup></label>
        <div class="col col-lg-3 controls">
        <input id="recipeqty" class="input-with-feedback" name="recipeqty" data-content="Required: Numeric - Ingredient Quantity" data-placement="top" data-toggle="popover" title="Ingredients Quantity" type="text">
        </select>
        </div>
        </div>

        <div class="onoffclass">
        <label for="recipeunit" class="col col-lg-1 control-label">Unit:<sup>&#42;</sup></label>
        <div class="col col-lg-3 controls">
        <input id="recipeunit" class="input-with-feedback" name="recipeunit" data-content="Required: unit like pcs/cups/pinch/spoons/etc " data-placement="top" data-toggle="popover" title="Ingredients Units" type="text">
        </select>
        </div>
        </div>

how to overcome this problem

regards

Checkbox selection problem

Hi, This cloning section of Form is very useful. but i am facing one issue in this.
While clicking the cloned checkbox caption, it automatically selecting the first checkboxes.
Please suggest for this issue.

Labels

Label's don't seem to update their 'for' attributes to match the cloned/updated input id. On your example, the cloned labels, when clicked, check/focus the original input.

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.