Learn Buffalo

Forms

Part 6

Create forms with Plush helpers or plain HTML.

  • form_for() used with a model or struct
  • form() helper to manually build form elements
  • generate a select tag from a map of values
  • add SelectValue and SelectLabel to satisfy selectable interface
  • build handler to accept form data
  • Bind() method to decode form into struct
  • manually process the form to process individual fields

Watch the video

View the code