{% comment %} Form Field Component Usage: {% include 'dashboard/components/form_field.html' with type="text" name="username" label="Username" value=user.username placeholder="Enter username" required=True help_text="Your unique username" error=form.username.errors %} Parameters: - type: Field type (text, email, password, number, textarea, select, checkbox, radio, file) - default: text - name: Field name (required) - id: Field id (defaults to name if not provided) - label: Field label (required) - value: Field value (optional) - placeholder: Field placeholder (optional) - required: Whether the field is required (default: False) - disabled: Whether the field is disabled (default: False) - readonly: Whether the field is readonly (default: False) - help_text: Help text to display below the field (optional) - error: Error message to display (optional) - options: List of options for select, checkbox, radio fields (required for these types) - rows: Number of rows for textarea (default: 3) - min, max, step: For number inputs (optional) {% endcomment %} {% if not name %} {% comment %}Ensure name is provided{% endcomment %}
{{ help_text }}
{% endif %}or drag and drop
{{ help_text|default:'PNG, JPG, GIF up to 10MB' }}
{{ help_text }}
{% endif %} {% if error %}{{ error }}
{% endif %}