• Resolved ofmarconi

    (@ofmarconi)


    How can I use this plugin to add more fields like this:

    Name
    Email
    Service
    [+ Add more services]

    … Clicking add it enters another SERVICE …

    Name
    Email
    Service
    service 2
    [+ Add more services]

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    @ofmarconi This is out of the scope of this plugin. But you could accomplish this (without using my plugin) with a bit of javascript.

    For example:

    [text service-1]
    <div class="service" style="display:none">[text service-2]</div>
    <div class="service" style="display:none">[text service-3]</div>
    <div class="service" style="display:none">[text service-4]</div>
    <div class="service" style="display:none">[text service-5]</div>
    <div class="service" style="display:none">[text service-6]</div>
    <a href="#" class="add-service">+ add more services</a>
    <script>
      jQuery('.add-service').click(function(){
        jQuery('.service:hidden:first').show();
      });
    </script>

    This might also help you: https://stackoverflow.com/questions/366379/how-to-find-first-element-that-is-hidden-by-jquery

    good luck!

    Thread Starter ofmarconi

    (@ofmarconi)

    Tks! I will try;)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bot?o de Adicionar mais campos’ is closed to new replies.