PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Auto create username based off predefined model

  1. I'm working on a site that will be using Student IDs as the username for the site. Is there a way for GF to auto create the username for the student based off a predefined model?

    For example, the base model is 95512xxxx, so when a new user fills out a particular form, they would be assigned a username (aka Student ID) of 955120001, or however the increments work.

    TIA

    Posted 13 years ago on Tuesday November 1, 2011 | Permalink
  2. Hi nwtech,

    There is hook in the User Registration Add-on that allows you to specify or modify the username as required:

    http://www.gravityhelp.com/documentation/page/Gform_username

    Posted 13 years ago on Tuesday November 1, 2011 | Permalink
  3. That's extremely helpful.

    While I'm only a novice with PHP, this looks promising if I can figure out how to alter the example for my needs.

    I assume that I'll have to implement this each time GF is updated?

    Posted 13 years ago on Tuesday November 1, 2011 | Permalink
  4. Nope! That is the beauty of hooks! They go a long way towards future-proofing customizations you make to plugin functionality. Not 100% guaranteed, but the closest you'll get to that. :)

    Posted 13 years ago on Tuesday November 1, 2011 | Permalink