|
| 1 | +--- |
| 2 | +name: create-web-form |
| 3 | +description: 'Create robust, accessible web forms with best practices for HTML structure, CSS styling, JavaScript interactivity, form validation, and server-side processing. Use when asked to "create a form", "build a web form", "add a contact form", "make a signup form", or when building any HTML form with data handling. Covers PHP and Python backends, MySQL database integration, REST APIs, XML data exchange, accessibility (ARIA), and progressive web apps.' |
| 4 | +--- |
| 5 | + |
| 6 | +# Create Web Form Skill |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +This skill provides comprehensive reference materials and best practices for creating web forms. It covers HTML syntax, UI/UX design, form validation, server-side processing (PHP and Python), data handling, and network communication. |
| 11 | + |
| 12 | +## Purpose |
| 13 | + |
| 14 | +Enable developers to build robust, accessible, and user-friendly web forms by providing: |
| 15 | + |
| 16 | +- HTML form syntax and structure |
| 17 | +- CSS styling techniques for form elements |
| 18 | +- JavaScript for form interactivity and validation |
| 19 | +- Accessibility best practices |
| 20 | +- Server-side form processing with PHP and Python |
| 21 | +- Database integration methods |
| 22 | +- Network data handling and security |
| 23 | +- Performance optimization |
| 24 | + |
| 25 | +## Reference Files |
| 26 | + |
| 27 | +This skill includes the following reference documentation: |
| 28 | + |
| 29 | +### UI & Styling |
| 30 | +- `styling-web-forms.md` - Form styling techniques and best practices |
| 31 | +- `css-styling.md` - Comprehensive CSS reference for form styling |
| 32 | + |
| 33 | +### User Experience |
| 34 | +- `accessibility.md` - Web accessibility guidelines for forms |
| 35 | +- `javascript.md` - JavaScript techniques for form functionality |
| 36 | +- `form-controls.md` - Native form controls and their usage |
| 37 | +- `progressive-web-app.md` - Progressive web app integration |
| 38 | + |
| 39 | +### HTML Structure |
| 40 | +- `form-basics.md` - Fundamental HTML form structure |
| 41 | +- `aria-form-role.md` - ARIA roles for accessible forms |
| 42 | +- `html-form-elements.md` - Complete HTML form elements reference |
| 43 | +- `html-form-example.md` - Practical HTML form examples |
| 44 | +- `html-reference.md` - General HTML reference |
| 45 | + |
| 46 | +### Server-Side Processing |
| 47 | +- `form-data-handling.md` - Network form data handling |
| 48 | +- `php-forms.md` - PHP form processing |
| 49 | +- `php-cookies.md` - Cookie management in PHP |
| 50 | +- `php-json.md` - JSON handling in PHP |
| 51 | +- `php-mysql-database.md` - Database integration with PHP |
| 52 | +- `php-reference.md` - PHP language reference |
| 53 | +- `python-contact-form.md` - Python contact form implementation |
| 54 | +- `python-flask.md` - Flask forms tutorial |
| 55 | +- `python-flask-app.md` - Building Flask web applications |
| 56 | +- `python-as-web-framework.md` - Python web framework basics |
| 57 | + |
| 58 | +### Data & Network |
| 59 | +- `xml.md` - XML data format reference |
| 60 | +- `hypertext-transfer-protocol.md` - HTTP protocol reference |
| 61 | +- `security.md` - Web security best practices |
| 62 | +- `web-api.md` - Web API integration |
| 63 | +- `web-performance.md` - Performance optimization techniques |
| 64 | + |
| 65 | +## Usage |
| 66 | + |
| 67 | +When creating a web form, consult the appropriate reference files based on your needs: |
| 68 | + |
| 69 | +1. **Planning**: Review `form-basics.md` and `form-controls.md` |
| 70 | +2. **Structure**: Use `html-form-elements.md` and `aria-form-role.md` |
| 71 | +3. **Styling**: Reference `styling-web-forms.md` and `css-styling.md` |
| 72 | +4. **Interactivity**: Apply techniques from `javascript.md` |
| 73 | +5. **Accessibility**: Follow guidelines in `accessibility.md` |
| 74 | +6. **Server Processing**: Choose between PHP or Python references |
| 75 | +7. **Data Storage**: Consult database and data format references |
| 76 | +8. **Optimization**: Review `web-performance.md` and `security.md` |
| 77 | + |
| 78 | +## Best Practices |
| 79 | + |
| 80 | +- Always validate input on both client and server sides |
| 81 | +- Ensure forms are accessible to all users |
| 82 | +- Use semantic HTML elements |
| 83 | +- Implement proper error handling and user feedback |
| 84 | +- Secure form data transmission with HTTPS |
| 85 | +- Follow progressive enhancement principles |
| 86 | +- Test forms across different browsers and devices |
| 87 | +- Optimize for performance and user experience |
0 commit comments