{"id":89,"date":"2025-02-06T03:35:03","date_gmt":"2025-02-06T03:35:03","guid":{"rendered":"https:\/\/ubrf.branduganda.com\/?page_id=89"},"modified":"2025-02-07T06:02:19","modified_gmt":"2025-02-07T06:02:19","slug":"new-discussion","status":"publish","type":"page","link":"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/","title":{"rendered":"New discussion"},"content":{"rendered":"<p><!-- START COPYING FROM HERE --><\/p>\n<div style=\"max-width: 1200px; margin: 0 auto; padding: 20px;\">\n    <!-- Login Notice --><\/p>\n<div style=\"background: #FFF9C4; padding: 20px; border-radius: 8px; text-align: center; margin-bottom: 30px;\">\n<h2 style=\"margin-bottom: 15px;\">Join the Discussion<\/h2>\n<p style=\"margin-bottom: 20px;\">To start a new discussion or reply to existing ones, please log in or create an account.<\/p>\n<div style=\"display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;\">\n            <a href=\"\/login\" style=\"background: #2563EB; color: white; padding: 10px 20px; border-radius: 4px; text-decoration: none; min-width: 100px;\">Log In<\/a><br \/>\n            <a href=\"https:\/\/ubrf.branduganda.com\/index.php\/join-us\/\" style=\"background: #059669; color: white; padding: 10px 20px; border-radius: 4px; text-decoration: none; min-width: 100px;\">Register<\/a>\n        <\/div>\n<\/p><\/div>\n<p>    <!-- Discussion Form --><\/p>\n<div style=\"background: white; padding: 20px; border-radius: 8px; margin-bottom: 30px;\">\n        <!-- Validation Feedback Container --><\/p>\n<div id=\"validationFeedback\" style=\"display: none; margin-bottom: 20px; padding: 15px; border-radius: 4px;\"><\/div>\n<form id=\"discussionForm\">\n            <!-- Title --><\/p>\n<div style=\"margin-bottom: 20px;\">\n                <label style=\"display: block; margin-bottom: 5px; font-weight: bold;\">DISCUSSION TITLE *<\/label><br \/>\n                <input type=\"text\" id=\"titleInput\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px;\" maxlength=\"100\"><\/p>\n<div id=\"titleCount\" style=\"font-size: 14px; color: #666; margin-top: 5px;\">Enter between 10 and 100 characters<\/div>\n<\/p><\/div>\n<p>            <!-- Category --><\/p>\n<div style=\"margin-bottom: 20px;\">\n                <label style=\"display: block; margin-bottom: 5px; font-weight: bold;\">Category *<\/label><br \/>\n                <select id=\"categorySelect\" style=\"width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px;\"><option value=\"\">Select a category<\/option><option value=\"name-reservation\">Name Reservation<\/option><option value=\"document-submission\">Document Submission<\/option><option value=\"payment-issues\">Payment Issues<\/option><option value=\"technical-problems\">Technical Problems<\/option><option value=\"experience-sharing\">Experience Sharing<\/option><\/select>\n            <\/div>\n<p>            <!-- Content --><\/p>\n<div style=\"margin-bottom: 20px;\">\n                <label style=\"display: block; margin-bottom: 5px; font-weight: bold;\">Discussion Content *<\/label><br \/>\n                <textarea id=\"contentInput\" style=\"width: 100%; min-height: 200px; padding: 10px; border: 1px solid #ddd; border-radius: 4px;\" maxlength=\"2000\"><\/textarea><\/p>\n<div id=\"contentCount\" style=\"font-size: 14px; color: #666; margin-top: 5px;\">Enter between 100 and 2000 characters<\/div>\n<\/p><\/div>\n<p>            <!-- Attachments --><\/p>\n<div style=\"margin-bottom: 20px;\">\n                <label style=\"display: block; margin-bottom: 5px; font-weight: bold;\">Attachments (Optional)<\/label><br \/>\n                <input type=\"file\" id=\"attachments\" multiple><\/p>\n<p style=\"font-size: 14px; color: #666; margin-top: 5px;\">Supported: PDF, DOC, DOCX, JPG, PNG (Max 5MB each)<\/p>\n<\/p><\/div>\n<p>            <!-- Notifications --><\/p>\n<div style=\"margin-bottom: 20px;\">\n                <label style=\"display: flex; align-items: center; gap: 10px;\"><br \/>\n                    <input type=\"checkbox\" id=\"notifyCheck\" checked><br \/>\n                    Notify me when someone replies<br \/>\n                <\/label>\n            <\/div>\n<p>            <!-- Buttons --><\/p>\n<div style=\"display: flex; gap: 10px; flex-wrap: wrap;\">\n                <button type=\"submit\" id=\"submitButton\" style=\"background: #9CA3AF; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: not-allowed;\" disabled>Post Discussion<\/button><br \/>\n                <button type=\"button\" id=\"draftButton\" style=\"background: #2563EB; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer;\">Save Draft<\/button>\n            <\/div>\n<\/p><\/form>\n<\/p><\/div>\n<p>    <!-- Preview --><\/p>\n<div style=\"background: white; padding: 20px; border-radius: 8px; border: 1px solid #e5e7eb;\">\n<h3 style=\"margin-bottom: 15px;\">Preview<\/h3>\n<div id=\"previewTitle\" style=\"font-size: 24px; font-weight: bold; margin-bottom: 15px;\">Your title will appear here<\/div>\n<div id=\"previewCategory\" style=\"color: #666; margin-bottom: 15px;\">Selected category will appear here<\/div>\n<div id=\"previewContent\" style=\"line-height: 1.6;\">Your content will appear here<\/div>\n<\/p><\/div>\n<\/div>\n<p><script>\ndocument.addEventListener('DOMContentLoaded', function() {\n    const form = document.getElementById('discussionForm');\n    const titleInput = document.getElementById('titleInput');\n    const contentInput = document.getElementById('contentInput');\n    const categorySelect = document.getElementById('categorySelect');\n    const submitButton = document.getElementById('submitButton');\n    const draftButton = document.getElementById('draftButton');\n    const validationFeedback = document.getElementById('validationFeedback');<\/p>\n<p>    function validateForm(showFeedback = true) {\n        const validationResults = {\n            isValid: true,\n            issues: []\n        };<\/p>\n<p>        \/\/ Title validation\n        const titleLength = titleInput.value.trim().length;\n        if (titleLength === 0) {\n            validationResults.issues.push(\"Discussion title is required\");\n            validationResults.isValid = false;\n        } else if (titleLength < 10) {\n            validationResults.issues.push(`Discussion title needs ${10 - titleLength} more characters`);\n            validationResults.isValid = false;\n        } else if (titleLength > 100) {\n            validationResults.issues.push(\"Discussion title exceeds maximum length of 100 characters\");\n            validationResults.isValid = false;\n        }<\/p>\n<p>        \/\/ Category validation\n        if (!categorySelect.value) {\n            validationResults.issues.push(\"Please select a discussion category\");\n            validationResults.isValid = false;\n        }<\/p>\n<p>        \/\/ Content validation\n        const contentLength = contentInput.value.trim().length;\n        if (contentLength === 0) {\n            validationResults.issues.push(\"Discussion content is required\");\n            validationResults.isValid = false;\n        } else if (contentLength < 100) {\n            validationResults.issues.push(`Discussion content needs ${100 - contentLength} more characters`);\n            validationResults.isValid = false;\n        } else if (contentLength > 2000) {\n            validationResults.issues.push(\"Discussion content exceeds maximum length of 2000 characters\");\n            validationResults.isValid = false;\n        }<\/p>\n<p>        \/\/ Update validation feedback\n        if (showFeedback) {\n            showValidationFeedback(validationResults);\n        }<\/p>\n<p>        \/\/ Update submit button state\n        submitButton.disabled = !validationResults.isValid;\n        submitButton.style.backgroundColor = validationResults.isValid ? '#2563EB' : '#9CA3AF';\n        submitButton.style.cursor = validationResults.isValid ? 'pointer' : 'not-allowed';<\/p>\n<p>        return validationResults.isValid;\n    }<\/p>\n<p>    function showValidationFeedback(validationResults) {\n        validationFeedback.style.display = 'block';\n        validationFeedback.style.backgroundColor = validationResults.isValid ? '#ECF9F0' : '#FEE2E2';\n        validationFeedback.style.color = validationResults.isValid ? '#059669' : '#DC2626';<\/p>\n<p>        if (!validationResults.isValid) {\n            validationFeedback.innerHTML = `<\/p>\n<div style=\"font-weight: bold; margin-bottom: 8px;\">Please correct the following issues:<\/div>\n<ul style=\"margin: 0; padding-left: 20px;\">\n                    ${validationResults.issues.map(issue => `<\/p>\n<li>${issue}<\/li>\n<p>`).join('')}\n                <\/ul>\n<p>            `;\n        } else {\n            validationFeedback.textContent = \"All requirements met - ready to submit\";\n        }\n    }<\/p>\n<p>    function updateCharacterCount(input, counterId, minChars, maxChars) {\n        const counter = document.getElementById(counterId);\n        const currentLength = input.value.trim().length;<\/p>\n<p>        let message = '';\n        let color = '';<\/p>\n<p>        if (currentLength === 0) {\n            message = `Required - Enter between ${minChars} and ${maxChars} characters`;\n            color = '#DC2626';\n        } else if (currentLength < minChars) {\n            message = `Need ${minChars - currentLength} more characters (${currentLength}\/${maxChars})`;\n            color = '#F59E0B';\n        } else if (currentLength >= maxChars) {\n            message = `Maximum length reached (${currentLength}\/${maxChars})`;\n            color = '#DC2626';\n        } else {\n            message = `Characters: ${currentLength}\/${maxChars}`;\n            color = '#059669';\n        }<\/p>\n<p>        counter.textContent = message;\n        counter.style.color = color;\n        input.style.borderColor = color;<\/p>\n<p>        validateForm(false);\n        updatePreview();\n    }<\/p>\n<p>    function updatePreview() {\n        document.getElementById('previewTitle').textContent = titleInput.value || 'Your title will appear here';\n        document.getElementById('previewCategory').textContent = categorySelect.options[categorySelect.selectedIndex].text || 'Selected category will appear here';\n        document.getElementById('previewContent').textContent = contentInput.value || 'Your content will appear here';\n    }<\/p>\n<p>    \/\/ Event Listeners\n    titleInput.addEventListener('input', () => updateCharacterCount(titleInput, 'titleCount', 10, 100));\n    contentInput.addEventListener('input', () => updateCharacterCount(contentInput, 'contentCount', 100, 2000));\n    categorySelect.addEventListener('change', () => {\n        validateForm();\n        updatePreview();\n    });<\/p>\n<p>    form.addEventListener('submit', function(e) {\n        e.preventDefault();\n        validateForm(true);<\/p>\n<p>        if (validateForm(true)) {\n            alert('Discussion posted successfully!');\n            form.reset();\n            updatePreview();\n            validationFeedback.style.display = 'none';\n        } else {\n            validationFeedback.scrollIntoView({ behavior: 'smooth', block: 'start' });\n        }\n    });<\/p>\n<p>    draftButton.addEventListener('click', function() {\n        const formData = {\n            title: titleInput.value,\n            category: categorySelect.value,\n            content: contentInput.value,\n            notify: document.getElementById('notifyCheck').checked\n        };<\/p>\n<p>        localStorage.setItem('discussionDraft', JSON.stringify(formData));\n        alert('Draft saved successfully!');\n    });<\/p>\n<p>    \/\/ Load draft if exists\n    const savedDraft = localStorage.getItem('discussionDraft');\n    if (savedDraft) {\n        const draft = JSON.parse(savedDraft);\n        if (confirm('Would you like to load your saved draft?')) {\n            titleInput.value = draft.title || '';\n            categorySelect.value = draft.category || '';\n            contentInput.value = draft.content || '';\n            document.getElementById('notifyCheck').checked = draft.notify;<\/p>\n<p>            updateCharacterCount(titleInput, 'titleCount', 10, 100);\n            updateCharacterCount(contentInput, 'contentCount', 100, 2000);\n            validateForm();\n            updatePreview();\n        }\n    }<\/p>\n<p>    \/\/ Initialize form\n    updateCharacterCount(titleInput, 'titleCount', 10, 100);\n    updateCharacterCount(contentInput, 'contentCount', 100, 2000);\n    validateForm();\n    updatePreview();\n});\n<\/script><br \/>\n<!-- END COPYING HERE --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Join the Discussion To start a new discussion or reply to existing ones, please log in or create an account. Log In Register DISCUSSION TITLE&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-89","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New discussion - Uganda Business Registrations forum<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New discussion - Uganda Business Registrations forum\" \/>\n<meta property=\"og:description\" content=\"Join the Discussion To start a new discussion or reply to existing ones, please log in or create an account. Log In Register DISCUSSION TITLE...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/\" \/>\n<meta property=\"og:site_name\" content=\"Uganda Business Registrations forum\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-07T06:02:19+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/\",\"url\":\"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/\",\"name\":\"New discussion - Uganda Business Registrations forum\",\"isPartOf\":{\"@id\":\"http:\/\/ubrf.branduganda.com\/#website\"},\"datePublished\":\"2025-02-06T03:35:03+00:00\",\"dateModified\":\"2025-02-07T06:02:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/ubrf.branduganda.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New discussion\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/ubrf.branduganda.com\/#website\",\"url\":\"http:\/\/ubrf.branduganda.com\/\",\"name\":\"Uganda Business Registrations forum\",\"description\":\"Public Service Liability\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/ubrf.branduganda.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New discussion - Uganda Business Registrations forum","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/","og_locale":"en_GB","og_type":"article","og_title":"New discussion - Uganda Business Registrations forum","og_description":"Join the Discussion To start a new discussion or reply to existing ones, please log in or create an account. Log In Register DISCUSSION TITLE...","og_url":"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/","og_site_name":"Uganda Business Registrations forum","article_modified_time":"2025-02-07T06:02:19+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/","url":"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/","name":"New discussion - Uganda Business Registrations forum","isPartOf":{"@id":"http:\/\/ubrf.branduganda.com\/#website"},"datePublished":"2025-02-06T03:35:03+00:00","dateModified":"2025-02-07T06:02:19+00:00","breadcrumb":{"@id":"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ubrf.branduganda.com\/index.php\/new-discussion\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/ubrf.branduganda.com\/"},{"@type":"ListItem","position":2,"name":"New discussion"}]},{"@type":"WebSite","@id":"http:\/\/ubrf.branduganda.com\/#website","url":"http:\/\/ubrf.branduganda.com\/","name":"Uganda Business Registrations forum","description":"Public Service Liability","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/ubrf.branduganda.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/pages\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":9,"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/pages\/89\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/pages\/89\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/ubrf.branduganda.com\/index.php\/wp-json\/wp\/v2\/media?parent=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}