Can't add custom field from registration form in AngularJS + Stormpath -
i want add custom field during new user registration shows error message:
not configured registration field.
but documentation on page https://docs.stormpath.com/angularjs/sdk/#/api/stormpath.spregistrationform:spregistrationform states:
any form fields supply not 1 of default fields (first name, last name) automatically placed new account's customa data object.
the code use:
<form ng-submit="submit()"> <div class="form-group"> <input type="text" class="form-control" placeholder="first name" ng-model="formmodel.givenname" required="" ng-disabled="creating"> </div> <div class="form-group"> <input type="text" class="form-control" placeholder="last name" ng-model="formmodel.surname" required="" ng-disabled="creating"> </div> <div class="form-group"> <input type="email" class="form-control" placeholder="email" ng-model="formmodel.email" required="" ng-disabled="creating"> </div> <div class="form-group"> <input type="password" class="form-control" placeholder="password" ng-model="formmodel.password" required="" ng-disabled="creating"> </div> <div class="form-group"> <input type="text" class="form-control" placeholder="custom field" ng-model="formmodel.customfield" required="" ng-disabled="creating"> </div> <p class="alert alert-danger" ng-show="error> <button type="submit" class="btn btn-primary" ng-disabled="creating">register</button> </form>
how can add custom field on registration form?
from error message sounds using our express-stormpath library on backend (please let me know if not correct).
you need configure fields in express server well. require sever-side form configuration well, prevent arbitrary requests user's custom data object.
documentation on form configuration can found here:
http://docs.stormpath.com/nodejs/express/latest/registration.html#creating-custom-fields
hope helps! p.s. work @ stormpath :)
Comments
Post a Comment