20 Oct, 2018

For editing data in modal popup with Dynamic ID passing

20 Oct, 2018

Dear Reader, let us we know about “For editing data in modal popup with Dynamic ID passing“.

This scenario comes when any user like Admin or Superadmin wants to edit the form data of any particular registered user in a popup format. Then it would be necessary that the Dynamic ID (fetched from Database Table) of respective user would be send to that Popup Form. And all the respective values (like User’s Name, User’s Contact No, User’s Email Id and all )of that user would be placed on respective fields (Like Name, Contact No, Email Id).

Step 1. Place a link of Edit Button for editing data of Particular User

Step 2. Place id of Modal Popup same as the Edit Button Link Id and ‘href’ link

Step 3. Write Script for getting Dynamic ID of that particular user on clicking of Edit Button.

And send that Dynamic ID to AJAX page for firing SQL Query for fetching all inserted field values of that User’s ID. When you get the required result row of all values then send it to your original page and set all values to HTML Fields, as set $(‘.fetched_user’).html(result); with the help of jQuery

In this way you can display value of Dynamic ID on Modal Popup easily.

Congratulations you have successfully learned “For editing data in modal popup with Dynamic ID passing”, if you like this post and was helpful for you then share this post on social media and if you have any query then please contact us or comment below, Thanks.

Related Articles
«
»

Leave a comment:

Your email address will not be published. Required fields are marked *