Spaces:
Running
Running
Download script.js from testforms/formfusion-pro: direct link, hf CLI and curl.
- Browser
- Download file 801 Bytes
-
https://huggingface.co/spaces/testforms/formfusion-pro/resolve/main/script.js
- Command line
-
hf download hf://spaces/testforms/formfusion-pro/script.js
-
curl -L -o script.js https://huggingface.co/spaces/testforms/formfusion-pro/resolve/main/script.js
801 Bytes
| document.addEventListener('DOMContentLoaded', function() { | |
| // Form validation | |
| const form = document.querySelector('form'); | |
| if (form) { | |
| form.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Simple validation | |
| const email = document.getElementById('email').value; | |
| const password = document.getElementById('password').value; | |
| if (!email || !password) { | |
| alert('Please fill in all fields'); | |
| return; | |
| } | |
| // Simulate form submission | |
| console.log('Form submitted', { email, password }); | |
| alert('Login successful! (demo)'); | |
| }); | |
| } | |
| // Add any additional interactive elements here | |
| }); |