gsp - Update or change user data form in Grails -
i must write update or change user data form in grails. form:
<g:form class="form-signin" controller="visitorspace"> <label for="login" class="sr-only">login</label> <g:textfield id="login" class="form-control" name="login" placeholder="login" required="" autofocus=""/> <label for="firstname" class="sr-only">your name</label> <g:textfield id="firstname" class="form-control" name="firstname" placeholder="your name" required="" type="text"/> <label for="lastname" class="sr-only">your lastname</label> <g:textfield id="lastname" class="form-control" name="lastname" placeholder="your lastname" required="" type="text"/> <label for="inputemail" class="sr-only">e-mail</label> <g:textfield id="inputemail" class="form-control" name="email" placeholder="e-mail" required="" autofocus="" data-translatable-string="email address" type="email"/> <label for="inputpassword" class="sr-only">password</label> <g:passwordfield id="inputpassword" class="form-control" name="password" placeholder="password" required="" data-translatable-string="password"/> <label for="confirmpassword" class="sr-only">confirm password</label> <g:passwordfield id="confirmpassword" class="form-control" name="controlpassword" placeholder="confirm password" required="" data-translatable-string="password"/> <g:actionsubmit value="commit change" action="updateuserdata" class="btn btn-lg btn-primary btn-block">commit change</g:actionsubmit> </g:form> the old data must shown in fields, must sent database moment when view-form loaded. know, may possible call required controller-method , such method must called before or while view-form loading. how this?
add value attribute input field elements current data want controller. asking for?
<g:textfield id="lastname" value="${objectinstance.lastname}" ... />
Comments
Post a Comment