ActionForm
This class provides a form structure for performing bulk actions on selected items within an administrative interface. It includes a choice field for selecting the desired action and a hidden boolean field to manage selections across multiple pages of results.
Attributes
| Attribute | Type | Description |
|---|---|---|
| action | forms.ChoiceField | Choice field representing the specific administrative action to be performed on the selected items. |
| select_across | forms.BooleanField = 0 | Boolean flag indicating whether the action should apply to all items across all pages of the result set, rather than just the visible items. |
Constructor
Signature
def ActionForm() - > null
Signature
def ActionForm(
data: dict = None,
files: dict = None,
auto_id: str = 'id_%s',
prefix: str = None,
initial: dict = None,
error_class: type = ErrorList,
label_suffix: str = None,
empty_permitted: bool = False,
field_order: list = None,
use_required_attribute: bool = None,
renderer: [BaseRenderer](../../../forms/renderers/baserenderer.md?sid=django_forms_renderers_baserenderer) = None
)
Parameters
| Name | Type | Description |
|---|---|---|
| data | dict = None | A dictionary of form data used for validation and field population |
| files | dict = None | A dictionary of uploaded file data |
| auto_id | str = 'id_%s' | The format string used to generate HTML ID attributes for form fields |
| prefix | str = None | A string used to prefix every field name in the form's HTML output |
| initial | dict = None | A dictionary of initial values for the form fields |
| error_class | type = ErrorList | The class used to display form errors |
| label_suffix | str = None | The character or string to append after every field label |
| empty_permitted | bool = False | Whether the form is allowed to be empty and still be considered valid |
| field_order | list = None | A list of field names specifying the order in which they should be rendered |
| use_required_attribute | bool = None | Whether to use the HTML 'required' attribute on form inputs |
| renderer | [BaseRenderer](../../../forms/renderers/baserenderer.md?sid=django_forms_renderers_baserenderer) = None | The renderer instance used to render the form to HTML |