--- linkTitle: Workflow title: Workflow weight: 2 --- {{% steps %}} ### Import ```golang import ( "html/template" "net/http" "gitnet.fr/deblan/go-form/form" "gitnet.fr/deblan/go-form/theme" ) ``` ### Create a form ```golang // Let's create a new form // You can pass *form.Field as arguments myForm := form.NewForm(field1, field2, ...) // Add somes fields myForm.Add(field3, field4, ...) // Set the method //
myForm.WithMethod(http.MethodPost) // Define the action // myForm.WithAction("/") // Set a name myForm.WithName("myForm") // Add options myForm.WithOptions(option1, option2, ...) // When all fields are added, call End() myForm.End() ``` #### Attributes Some options are natively supported in go-form themes. ```golang myForm.WithOptions( form.NewOption("help", "A help for the form"), //