{"id":52,"date":"2014-05-05T14:03:06","date_gmt":"2014-05-05T14:03:06","guid":{"rendered":"http:\/\/www.morematter.net\/?p=52"},"modified":"2014-05-05T14:03:06","modified_gmt":"2014-05-05T14:03:06","slug":"use-name-to-add-an-id-attribute-to-gform-in-grails","status":"publish","type":"post","link":"https:\/\/experimentalism.net\/morematter\/use-name-to-add-an-id-attribute-to-gform-in-grails\/","title":{"rendered":"Use &#8220;name&#8221; to add an &#8220;id&#8221; attribute to g:form (in Grails)"},"content":{"rendered":"<p>If you want to use the simple syntax &lt;g:form action=&#8217;myaction&#8217; \/&gt;, adding id=&#8221;x&#8221; will result in a form post to \/myaction\/x &#8211; to get a post to \/myaction with a form id attribute of &#8220;x&#8221;, use the name attribtue instead, as &lt;g:form action=&#8217;dologin&#8217; name=&#8217;x&#8217; \/&gt;, per this thread: <a href=\"https:\/\/jira.grails.org\/browse\/GRAILS-895\" target=\"_blank\">https:\/\/jira.grails.org\/browse\/GRAILS-895<\/a><\/p>\n<p>Alternately, you can use the syntax &lt;g:form url=&#8221;[action:&#8217;myaction&#8217;]&#8221; id=&#8221;x&#8221;&gt;, but that may present other issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to use the simple syntax &lt;g:form action=&#8217;myaction&#8217; \/&gt;, adding id=&#8221;x&#8221; will result in a form post to \/myaction\/x &#8211; to get a post to \/myaction with a form id attribute of &#8220;x&#8221;, use the name attribtue instead, as &lt;g:form action=&#8217;dologin&#8217; name=&#8217;x&#8217; \/&gt;, per this thread: https:\/\/jira.grails.org\/browse\/GRAILS-895 Alternately, you can use the syntax [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-grails"],"_links":{"self":[{"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":2,"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":54,"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/posts\/52\/revisions\/54"}],"wp:attachment":[{"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/experimentalism.net\/morematter\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}