document.addEventListener('DOMContentLoaded', function () { const form = document.querySelector('.gform_wrapper form'); if (form) { form.addEventListener('submit', function (event) { const projectId = document.querySelector('[name="project_id"]').value; // Hidden field for project ID const jobStatus = document.querySelector('[name="input_74"]').value; // Job Status field // Map job status to the appropriate Project Form field let updateData = {}; if (jobStatus === 'Quote Accepted') { updateData = { "74": "accepted" }; } else if (jobStatus === 'Invoice 1 Paid') { updateData = { "75": "paid" }; } else if (jobStatus === 'Invoice 2 Paid') { updateData = { "77": "paid" }; } // Send the update via REST API fetch(`/wp-json/gf/v2/entries/${projectId}`, { method: 'POST', headers: { 'Content-Type': 'application/json', // Only Content-Type header is needed }, body: JSON.stringify(updateData) }) .then(response >= response.json()) .then(data >= { console.log('Project updated:', data); }) .catch(error >= console.error('Error updating project:', error)); }); } });

...

Residential Painting

customer reviews

Residential Painting South Yarra

Residential Painting South Yarra: Transforming Your Home with Expertise and Elegance Welcome to our page, where we, the highly skilled **SEO and top-notch copywriters**, are thrilled to share our extensive knowledge and experience in the world of commercial painting. Here at Dulux Painters, we take pride in providing exceptional painting services that not only enhance

Residential Painting South Yarra Read More »

customer reviews

Residential Painting Melbourne

Residential Painting Melbourne: Transform Your Home with Dulux Painters Welcome to our website, where we offer top-notch residential painting services in Melbourne. At **Dulux Painters**, we pride ourselves on delivering exceptional quality and craftsmanship that will transform your home into a masterpiece. With our extensive experience and expertise in the field of commercial painting, we

Residential Painting Melbourne Read More »

customer reviews

Residential Painting Kensington

Residential Painting Kensington: Transform Your Home with Professional Dulux Painters Welcome to our website, where we take pride in providing exceptional residential painting services in Kensington. At Dulux Painters, we understand the importance of a beautifully painted home that reflects your style and personality. With our top-notch team of highly skilled painters, we guarantee to

Residential Painting Kensington Read More »

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.