Our Requirment :-

Details :-

jfjfiejfij eejegjeiogjegjegjereijege

jQuery(document).ready(function($) {
// Make sure that $first_post is a valid number and escape it properly
var firstPost = ; // Ensure it’s a valid integer

if (firstPost > 0) {
    // Function to load details of the first product requirement by default
    loadProductRequirementDetails(firstPost);
}

// Click event on product requirement titles
$('.requirement-title').click(function() {
    var post_id = $(this).data('post-id');
    loadProductRequirementDetails(post_id);
});

// Function to load the details dynamically
function loadProductRequirementDetails(post_id) {
    // Hide the 'Fulfill Request' button initially
    $('#fulfill-request-btn').hide();

    // AJAX request to fetch the post content
    $.ajax({
        url: productRequirements.ajax_url,
        type: 'POST',
        data: {
            action: 'get_product_requirement_details',
            post_id: post_id
     

Fill the form correctly