Parameter user registration

Good morning, I am new and I haven’t yet understood how the user registration plugin of Gravity Forms works. I have created an update form identical to the registration form. Which parameters should I use in the meta fields to enable the display of fields that have already been filled in during the registration phase?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Hi Donato,

The following list shows how you can use Gravity Flow to have one form handle both user registration + updates thanks to the Update User step type. If you don’t need approval between each registration and update, the workflow you setup would be even easier to create.

  1. A potential user submits the registration form.
  2. The entry goes to an Administrator for an approval step.
  3. On approval, the user is created via the User Registration feed.
  4. Via the gravityflow_step_complete action the newly created user ID is stored in the User workflow field of the entry.
  5. A notification step sends an email with a link to update their profile
  6. The user updates their profile data through a user input step.
  7. The updated entry is approved via an approval step.
  8. The Update User workflow step updates the user’s profile and the entry goes back to ‘Change Profile Data’ for more changes.

The code snippet for gravityflow_step_complete in that case is:

add_action( 'gravityflow_step_complete', 'get_registered_user', 10, 4 );
function get_registered_user( $step_id, $entry_id, $form_id, $status ) {
	//Field 3 = Email
	//Field 11 = User Field
	// ensure correct step id
	if ( $step_id == '205' ) {
        	// get the entry details
        	$entry = GFAPI::get_entry( $entry_id );
        	// get user by email input
        	$user = get_user_by( 'email', $entry[3] );
        	// update the user ID in the hidden user field if it matches
		if (  $user ) {
	        	GFAPI::update_entry_field( $entry_id, '11', $user->ID );
		}
	}
}

Cheers,
Jamie