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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:40:32+00:00 2026-05-22T14:40:32+00:00

Hello I have around 6 fields which are read only presently. I now would

  • 0

Hello I have around 6 fields which are read only presently. I now would have to make them editable. So I am thinking of having one image/button, which onclick would trigger the edit functionality. So onclick of that button, I would have a form load up which would have the textboxes, which makes those fields editable. I am trying to do this with JQuery, I am unable to understand on how to get a editable form out of read only fields.

How is it possible to load up a form which would have same fields as the one we had earlier and allows the users to edit?

This is my present code, I would have to load my editable form into the id.

<div id="student-infomercial">
<ul>
<label>Name:</label>
<div ><?php echo $name; ?></div>
</li>
<li>
<label>Age:</label>
<div ><?php echo $age; ?></div>
</li>
<li>
<label>Country:</label>
<div ><?php echo $country; ?></div>
</li>
<li>
<label>State:</label>
<div ><?php echo $state; ?></div>
</li>
<li>
<label>City:</label>
<div ><?php echo $city; ?></div>
</li>
<li>
<li>
<label>Zip:</label>
<div ><?php echo $zip; ?></div>
</li>
</ul>
</div>
  • 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-22T14:40:33+00:00Added an answer on May 22, 2026 at 2:40 pm

    So I guess you’re asking how to transform your element into ? You can do it, but it probably will be too much trouble. If I were you I would have following html instead:

    <div id="student-infomercial">
    <ul>
    <label>Name:</label>
    <input class="disabled" disable="true"><?php echo $name; ?></input>
    </li>
    <li>
    <label>Age:</label>
    <input class="disabled" disabled="true"><?php echo $age; ?></input>
    </li>
    </div>
    

    then in your javascript:

    $("#buttonId").bind("click", function(){
       var fields = $(".disabled");
        fields.removeClass("disabled");
        fields.addClass("enabled");
        fields.removeAttr("disabled", "");
    });
    

    If you insist on using <div> then you will have to transform the <div> tags to <input> tags upon some event.

    There are many many more ways you can achieve your goal; the above is just the solution that pops into my mind.

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

Sidebar

Related Questions

Hello I have been having trouble with this for a while now. I have
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello I have a table on which I have denied SELECT privs to a
Hello i have a app which makes 3 wheels from 3 different arrays of
I have a simple hello, world servlet application that I am just playing around
I'm playing around with Reflection and I thought I'd make something which loads a
hello master around the world, im here again with a problem :D now i
I have read the docs over and over trying to wrap my head around
I have the following sed command which puts brackets around the first word -
Hello folkes I have this little problem for which I cannot find a suitable

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.