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

  • Home
  • SEARCH
  • 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 8104803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:58:56+00:00 2026-06-05T23:58:56+00:00

Like i sayed in the title, i need to build an array and change

  • 0

Like i sayed in the title, i need to build an array and change value in form input field’s
the code is:

<div class="row-dp">
    <div class="cel-1">Obiectiv</div>
    <div class="cel-2" id="obiectiv">macarale</div>
    <div class="cel-3">&nbsp;</div>
</div>
<div class="row-dp">
    <div class="cel-1">Orasul selectat</div>
    <div class="cel-2" id="orasulselectat">Bucuresti</div>
    <div class="cel-3">&nbsp;</div>
</div>

I need to take from ” <div class="cel-2" ” id to be a key and value to be value

an example

VAR['obiectiv'] = macarale;
VAR['orasulselectat'] = Bucuresti;

to transform from value in input field like

<input name="obiectiv" value="macarale" type="text" />

Thank you!

  • 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-05T23:58:57+00:00Added an answer on June 5, 2026 at 11:58 pm
    $('.cel-2').each(function() {
      $('input[name='+this.id+']').val($(this).text());
    });
    

    If you have to create the input elements, use this:

    $('.cel-2').each(function() {
      $('#yourFormNameHere').append($('<input/>').prop({'name':this.id,'type':'hidden'}).val($(this).text()));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a model like this: class Talk(BaseModel): title = models.CharField(max_length=200) mp3 = models.FileField(upload_to
I have an array of data saved in cookie, like this 1:good,2:accelent,3:bad,4:good,fname:Ahmad,lname:Riaz,title:Developer,org:Magiclamp,email:Riaz@khan.com here i
Like the title says I'm having some trouble printing out symbol codes and their
My Form is something like this. I have saved field_name and field_values into a
In PhpMyAdmin I use this query: SELECT * FROM myrecords where TITLE LIKE %\\\%
I have this div in my master page. <div id=UICancelChanges title=Are you sure? style=display:
I've a three level nested form, but the third class is not saved. I've
First of all I'd like to state that, despite the title, this question is
I've attached onsubmit handler in a form tag like this: <form action=file.php method=post onsubmit=
I need to add user data to my database via a form So I

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.