Choosing the right hooks to create username [RESOLVED]

I am creating a user registration form, using GF User Registration add-on.
I want to create a WP username based on the input from first name and last name.

I am struggling to select the right hooks that will allow me to construct the username string and populate the username field prior to submission.

I can use dynamic population to fill the username field, but can’t get access to the pre-submitted name field entries. (I can only read these data post submission.)

Suggestions very welcome.

Have you tried the gform_user_registration_username filter? It looks like there is example code in this documentation that does something along the lines of what you’re needing.

1 Like

This looks exactly what I need
Many thanks for the pointer …

2 Likes