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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:37:03+00:00 2026-05-24T10:37:03+00:00

I need to create a form for the field: id After entering the value

  • 0

I need to create a form for the field:

id

After entering the value for the id, the id needs to be matched in Database and the values obtained from the Database should be filled in the other forms.

i.e., the value of the title from the database should be filled in title form(input type=”text”) of the html.

this title field will also be present on the same page of the id field.

i.e., there will be a id field followed by a submit button after submitting the id the associated values of the id will be fetched and will be filled in the other form structures on the same page.

Can you suggest me how to do this.

Help appreciated and thanks for u r time.

  • 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-24T10:37:03+00:00Added an answer on May 24, 2026 at 10:37 am

    Use jQuery.ajax to perfrom ajax request, than render the response as you need. Here is an example:

    <form>
    <input type='hidden' id='id'>
    <input type='button' id='fetchData'>
    <div id='content_placeholder'></div>
    </form>
    
    <script type='text/javascript'>
    $(document).ready(function(){ 
        $("#fetchData").click(function(){
            var id = $('#id').val();
            $.ajax({
                type:'post',
                dataType:'json',
                url: '*backend url here*'
                success: function(data, textStatus){
                    renderData(data);
                    //This will remove this button, so user will not be able 
                    //press it two times
                    $("#fetchData").remove(); 
                }
            });
        });
    });
    
    function renderData(data){
        var placeholder = $('#content_placeholder');
        //...perform operations on data....//
        createInput('name_input','name',data.name).appendTo(placeholder);
        createInput('description_input','description',data.name).appendTo(placeholder);
    }
    
    function createInput(id, name, value){
        var result = $("<input>").attr({id:id, name:name}).val(value);
        return result;
    }
    </script>
    

    In your backend you’ll have to use json_encode to have data encoded in json-compatible way. Here is an example:

    <?php
    $result = array('name'=>'John Smith', 'description'=>'Unknown buddy');
    echo json_encode($result);
    ?>
    

    See jQuery.ajax, PHP json_encode for details.

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

Sidebar

Related Questions

I need to create a full-text search form for a database of emails /
I need to create Copy action for model listing. It should take all values
I need to create a form that has many of the same fields, that
I need to create a form with, half linear view (textboxes and dropdownlists in
I need to create a Gold bar for my windows form similar to what
I need to create a historical timeline starting from 1600's to the present day.
I have a simple, dynamic email form field. After the user submits their email,
I am working on a project in which I need to create a form
I have a FormWizard where I need data from the first form to pass
I'm trying to create a form using Zend_Form (Zend_Framework component). The users should be

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.