This page last changed on Feb 17, 2006 by [email protected].

Tag - form

Description

Creates a form that submits to a controller, action, and/or id. Beyond what is below all the usual HTML attributes apply.

Parameters

  • action (optional) - the name of the action to use in the link, if not specified the default action will be linked
  • controller (optional) - the name of the controller to use in the link, if not specified the current controller will be linked
  • id (optional) - The id to use in the link
  • url (optional) - A map containing the action,controller,id etc.

Examples

Example controller for an application called "shop":

BookController.groovy
class Book {
     @Property list = { [ books: Book.list( params ) ] }
     @Property show = { [ book : Book.get( params['id'] ) ] }
}

 

Example usages for above controller:

<g:form action="myaction" id="1">...</gr:form>
<g:form url="[action:'list',controller:'book']">...</gr:form>
Document generated by Confluence on Mar 29, 2006 08:46