Terms and Conditions Generator
Customize and generate a Terms and Conditions document for your website or application.
Configuration
Modal content goes here.
Please read these terms and conditions carefully before using Our Service.
1. Agreement to Terms
By using the service provided at ${data.websiteUrl} ("Service"), operated by ${data.companyName}, you agree to be bound by these Terms and Conditions. If you disagree with any part of the terms, then you may not access the Service.
`; // Add optional clauses if (document.querySelector('[data-clause="accounts"]').checked) termsHTML += clauses.accounts; if (document.querySelector('[data-clause="ugc"]').checked) termsHTML += clauses.ugc; if (document.querySelector('[data-clause="termination"]').checked) termsHTML += clauses.termination; termsHTML += `Intellectual Property
The Service and its original content, features and functionality are and will remain the exclusive property of ${data.companyName} and its licensors. The Service is protected by copyright, trademark, and other laws of both the United States and foreign countries.
Governing Law
These Terms shall be governed and construed in accordance with the laws of ${data.jurisdiction}, without regard to its conflict of law provisions.
Changes
We reserve the right, at our sole discretion, to modify or replace these Terms at any time. We will try to provide at least 30 days' notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.
Contact Us
If you have any questions about these Terms, you can contact us by email: ${data.contactEmail}
`; return termsHTML; } /** * Updates the live preview pane. */ function updatePreview() { termsPreview.innerHTML = generateTermsText(); } /** * Generates and downloads a PDF of the terms. */ function downloadPDF() { const requiredFields = ['companyName', 'websiteName', 'websiteUrl', 'effectiveDate', 'jurisdiction', 'contactEmail']; const isMissing = requiredFields.some(id => !document.getElementById(id).value); if (isMissing) { showModal('Please fill in all configuration fields before downloading the PDF.'); return; } const { jsPDF } = window.jspdf; if (typeof jsPDF === 'undefined' || typeof html2canvas === 'undefined') { showModal('Error: PDF generation library failed to load.'); return; } const doc = new jsPDF({ unit: 'pt', format: 'a4' }); const source = termsPreview; const margin = 40; doc.html(source, { x: margin, y: margin, width: 595 - (margin * 2), // A4 width in points minus margins windowWidth: source.scrollWidth, callback: function(doc) { doc.save('Terms-and-Conditions.pdf'); } }); } // --- Event Listeners --- formInputs.forEach(input => input.addEventListener('input', updatePreview)); clauseCheckboxes.forEach(checkbox => checkbox.addEventListener('change', updatePreview)); downloadPdfBtn.addEventListener('click', downloadPDF); // --- Initial Load --- document.getElementById('effectiveDate').value = new Date().toISOString().split('T')[0]; updatePreview(); });