Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7949021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:52:48+00:00 2026-06-04T01:52:48+00:00

http://jsfiddle.net/NzbRQ/2/ I allow the user to add multiple rows of fields, but I do

  • 0

http://jsfiddle.net/NzbRQ/2/

I allow the user to add multiple rows of fields, but I do not want to include a delete link on the very first row of fields, so they can’t delete all the fields.

Also, how do I limit it to only 3 rows of fields?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:52:49+00:00Added an answer on June 4, 2026 at 1:52 am

    Try this fiddle: Fiddle

    For the first part of hiding the delete on the first row, I called the following on page load:

    $(".removeoutcome").hide();
    

    Then to make sure they can’t add more than 3 or delete the last one, I’ve added length checks in your click methods, see:

    $('.addoutcome').live('click', function() {
        if ($(".outcomegroup").length < 3) {
            $('#template').clone().removeAttr('id').insertAfter($(this).closest('.outcomegroup')).find('.minus').show();
            renumber();
        }
    });
    
    $('.removeoutcome').live('click', function() {
        if ($(".outcomegroup").length > 1) {
            $(this).closest('.outcomegroup').remove();
            renumber()
        }
    });
    

    Also, on a side note, live is deprecated now, so if you’re using jQuery 1.7, change these methods to on or if you’re pre-1.7, use delegate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://jsfiddle.net/aBaw6/2/ This demo does not add class when you hover a list item. What
http://jsfiddle.net/yDx55/ The last div is supposed to be 100% for height but I want
http://jsfiddle.net/AndyMP/UpLts/1/ This is just an example for illustrative purposes, but what I want to
http://jsfiddle.net/TAvtJ/ Trying to do something more complex, but I seem to not understand the
http://jsfiddle.net/M6xdq/ What I want to achieve, is - when user clicks the read more
http://jsfiddle.net/buhlett/paw5w/ The accordion works smoothly but it doesn't allow me to close all the
http://jsfiddle.net/NCt4D/ I want it to move (the image is large), but it dont work.
http://jsfiddle.net/WTELW/4/ The following works fine on JSFiddle, but doesn't seem to work right in
http://jsfiddle.net/VhjR7/1/ When you click the my lists menu once, it expands, but if you
http://jsfiddle.net/zUAQC/11/ In this sample, In javascipt box's sampleDiv,I add the next input checkbox .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.