From d89541a762b4dc97d0fe3b6e12d6275cd99963e2 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 27 Jul 2025 12:54:40 +0200 Subject: [PATCH] feat: update attr documentation --- content/docs/fields/_index.md | 17 +++++++++-------- content/docs/workflow/_index.md | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/content/docs/fields/_index.md b/content/docs/fields/_index.md index 38f5660..bdbba1c 100644 --- a/content/docs/fields/_index.md +++ b/content/docs/fields/_index.md @@ -268,14 +268,15 @@ func (f *Field) WithOptions(options ...*Option) *Field #### Common options -| Name | type | description | Info | -| ---- | ---- | ---- | ---- | -| `required` | `bool` | Add `required="true"` | Does not apply a constraint | -| `attr` | `map[string]string` | List of extra attributes of the field | | -| `row_attr` | `map[string]string` | List of extra attributes of the field's top container | | -| `label` | `string` | The label of the field | Usually show before the field | -| `label_attr` | `map[string]string` | List of extra attributes of the label | | -| `help` | `string` | Helper of the field | | +| Name | type | description | Info | +| ---- | ---- | ---- | ---- | +| `required` | `bool` | Add `required="true"` | Does not apply a constraint | +| `attr` | `form.Attrs` | List of extra attributes of the field | | +| `row_attr` | `form.Attrs` | List of extra attributes of the field's top container | | +| `label` | `string` | The label of the field | Usually show before the field | +| `label_attr` | `form.Attrs` | List of extra attributes of the label | | +| `help` | `string` | Helper of the field | | +| `help_attr` | `form.Attrs` | List of extra attributes of the help | | Appends options to the field diff --git a/content/docs/workflow/_index.md b/content/docs/workflow/_index.md index 48eb8aa..6f2b485 100644 --- a/content/docs/workflow/_index.md +++ b/content/docs/workflow/_index.md @@ -54,7 +54,7 @@ Some options are natively supported in go-form themes. myForm.WithOptions( form.NewOption("help", "A help for the form"), //