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 1052893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:10:03+00:00 2026-05-16T17:10:03+00:00

Basically what I’m trying to accomplish is I want to check multiple dynamic forms

  • 0

Basically what I’m trying to accomplish is I want to check multiple dynamic forms on a page. Then if All textareas are empty OR have the default value, perform a function. Otherwise if any of them are not empty without the default value, cancel the function.

I know how to get the total count of the divs/forms or go through each one, sorta. Just can’t put it together. I want it to check them all first before doing anything.

if (jQuery("div[id^='statuscontainer_']:last").length == 0){

}

I don’t think this would get quite what I need to do. Or either I not sure how to form it into the function I need.
Thanks

  • 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-05-16T17:10:04+00:00Added an answer on May 16, 2026 at 5:10 pm

    You could take this approach

    1. Give each input a similar class, in my example, inputBox
    2. Create a script to add the total of each inputBox length. If that total == 0, take whatever approach, otherwise continue with the script

      $('#show').click(function() {
          var total = 0;
          $('.inputBox').each(function() {
              total += this.value.length;
          });
          if (total == 0) {
              // Do whatever if it's empty
          } else {
              // Do whatever if its not
          }
      });
      
    3. ???
    4. Profit

    Try it

    http://jsfiddle.net/kLnHC/

    Edit

    Though, in your application, you’d probably want to change the event that triggers it to $('#yourForm').submit(function() { rather than a click function.

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

Sidebar

Related Questions

Basically I have an IFRAME that contains a given page - I want to
Basically I want to check the extended permissions the user has granted my app.
Basically, what I'm trying to create is a page of div tags, each has
Basically, I have a main page (parent page) with a link that opens up
Basically I have a loop incrementing i, and I want to do this: var
Basically in my in my aspx page I have a gridview which displays the
Basically, I want to be able to say that few fields have extra restrictions
Basically I have some CheckBox controls I want to use to show or hide
Basically I have some code to check a specific directory to see if an
Basically I am trying to restart a service from a php web page. Here

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.