grails - Passing the value of textbox as form id -
trying pass value entered in textbox user id of form. code snippet below. passes params.id = "index" in controller. if hardcode form id="sometext" passes params.id = "sometext" controller. due constraints have use button element instead of g:actionsubmit.
<g:form controller="search" action="index" id=${searchtext} method="post"> <div> <g:textfield name="searchtext"></g:textfield> <button type="submit" class="btn"> <i class="icon-search"></i> </button> </div> </g:form>
any solutions?
<g:form controller="search" action="index" method="post"> <div> <g:textfield name="id"></g:textfield> <button type="submit" class="btn"> <i class="icon-search"></i> </button> </div> </g:form>
Comments
Post a Comment