PN
Phu Nguyen

Default Component - Copy this React, Tailwind Component to your project

phần nút submit thì dựa theo source code này tạo ra 2 nút để ứng viên có thể tùy chọn gửi qua mail hoặc gmail function formatFieldLabel(label) { return label.replace(/([A-Z])/g, ' $1').replace(/^./, str => str.toUpperCase()).trim(); } function checkCVLink(input) { if (!input.value.trim()) { input.value = ""; } } function gatherFormData() { const fields = ["fullName", "contact", "timeZone", "phone", "workingHours", "linkedin", "introduction", "cvLink"]; const data = {}; fields.forEach(field => { const value = document.getElementById(field).value; data[formatFieldLabel(field)] = value; }); return data; } function generateMailToLink(subject, body, email = "info@adererror.co") { return `mailto:${email}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`; } function submitViaGmail() { const formData = gatherFormData(); const subject = `${formData["Full Name"]} - Digital Marketing Specialist Application`; const body = Object.entries(formData) .map(([key, value]) => `${key === 'Cv Link' ? 'CURRICULUM VITAE (CV)' : key.toUpperCase()}: ${value}`) .join("\n\n"); const mailtoLink = `https://mail.google.com/mail/u/0/?fs=1&to=info@adererror.co&su=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}&tf=cm`; window.open(mailtoLink, '_blank'); } function submitViaEmail() { const formData = gatherFormData(); const subject = `${formData["Full Name"]} - Digital Marketing Specialist Application`; const body = Object.entries(formData) .map(([key, value]) => `${key === 'Cv Link' ? 'CURRICULUM VITAE (CV)' : key.toUpperCase()}: ${value}`) .join("\n\n"); const mailtoLink = generateMailToLink(subject, body); window.location.href = mailtoLink; }

Prompt
Component Preview

About

DefaultComponent - A versatile form for LinkedIn, portfolio, resume, and cover letter uploads, professionally built with React and Tailwind. Start coding now!

Share

Last updated 1 month ago