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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:19:57+00:00 2026-06-12T15:19:57+00:00

EDIT:**I already have the divs cloned. All i need is a selector that will

  • 0

EDIT:**I already have the divs cloned. All i need is a selector that will select both the form field and the container that are already cloned and have the same class. So there are sets of Divs and Form fields with classes like Question1, Question3, Question7 etc. I need the Value of Form Question1 in #div to be the .html() of the div question1 inside #another div. Need a function that can do this for Question1, Question3, Question4, and all other Question# classes that exist . **END EDIT
I have a set up where, clicking on a button called Add Questions clones a set of form fields, but also a set of (hidden) empty container like <h2></h2> the form field and its corresponding container have the same class but are in different divs (the divs have different ids), and they are the only fields with that class on the page. What I need to do is something like this. After generation, the user fills in the form. This data needs to be filled into the corresponding container (the one with the same class) using .html().
Like this but it needs to do this for all the fields with classes similar to question#:

var form = $("#divcontainer .sameclass[#]").val();
        $('#anotherdiv .sameclass[#]').html(form);

The dynamically generated forms and the container have classes like "question1, question2" etc but they may not be in the right order and may skip numbers. so it may be "question1 for the first form and container and question7 for next form field and container“
Is there some wildcard or something I could use for this?

  • 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-12T15:19:58+00:00Added an answer on June 12, 2026 at 3:19 pm

    try this..how bout this..dont get exactly the code get what i mean

      $("divcontainer").each(function (i) {
        var yourclass = $(this).attr("class");
        var form = $("#divcontainer " + yourclass).val();
        $("#anotherdiv  " + yourclass).html(form);
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: See my answer below--> I am wanting to have a view that when
I've got a form that's a few pages long. To traverse the form all
I already have an iPhone App that stores data in a file in the
Edit: Originally I had a simple form Ajax script that wasn't working, turns out
I already have a complete web application that was developed for almost two years,
I already have a web server that I pay for, and I want to
I have looked at all the Python Twitter API wrappers that I could find
EDIT: This issue is already submitted on Github. Changing the Act part to this
Edit : This question has already been asked and answered, and I apparently am
There are already jQuery based Edit in place plug ins available. But i am

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.