{% comment %} Inline Form Layout ================== Renders form fields horizontally with labels inline with inputs. Purpose: Provides an inline/horizontal form layout where labels appear to the left of inputs on larger screens. Usage Examples: Basic inline form: {% include 'forms/layouts/inline.html' with form=form %} Custom label width: {% include 'forms/layouts/inline.html' with form=form label_width='w-1/4' %} Parameters: Required: - form: Django form object Optional: - exclude: Comma-separated field names to exclude - fields: Comma-separated field names to include - label_width: Label column width class (default: 'w-1/3') - show_help: Show help text (default: True) - show_required: Show required indicator (default: True) - submit_text: Submit button text (default: 'Submit') - submit_class: Submit button CSS class (default: 'btn-primary') - show_cancel: Show cancel button (default: False) - cancel_url: URL for cancel button - form_class: Additional CSS classes for form wrapper Dependencies: - forms/partials/form_field.html - Tailwind CSS Accessibility: - Labels properly associated with inputs - Responsive - stacks on mobile {% endcomment %} {% load common_filters %} {% with show_help=show_help|default:True show_required=show_required|default:True label_width=label_width|default:'w-1/3' submit_text=submit_text|default:'Submit' %}
{{ field.help_text }}
{% endif %}{{ field.help_text }}
{% endif %}{{ field.help_text }}
{% endif %}