Title: CUSTOM REGISTRATION FROM &#8211; GRAVITY FORMS
Last modified: December 8, 2017

---

# CUSTOM REGISTRATION FROM – GRAVITY FORMS

 *  [RiaanC](https://wordpress.org/support/users/riaanc/)
 * (@riaanc)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/custom-registration-from-gravity-forms/)
 * Good day,
 * Thank you for a great plugin, which has become essential to our business! I have
   one question though.
 * We are using the plugin to manage the expiry for users subscribing to a trial
   period via a custom registration page. The form on the custom registration form
   is done with Gravity Forms and the User Registration add-on.
 * One of your plugin settings is to “Automatically set expiry date for new users
   who register via the registration form.”, but that does not work if I use the
   custom registration form. Any ideas on how I can get this to work would be appreciated.
 * Regards
    Riaan
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-registration-from-gravity-forms%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [sassycelebrants](https://wordpress.org/support/users/sassycelebrants/)
 * (@sassycelebrants)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-registration-from-gravity-forms/#post-9896689)
 * Did you get any help with this? I have the same issue
 *  Thread Starter [RiaanC](https://wordpress.org/support/users/riaanc/)
 * (@riaanc)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-registration-from-gravity-forms/#post-9896728)
 * Hi. No I did not. Currently I have to manually set the expiry date so it is not
   truly automated.
 * If you use the default WP registration form it works just fine.
 *  [sassycelebrants](https://wordpress.org/support/users/sassycelebrants/)
 * (@sassycelebrants)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-registration-from-gravity-forms/#post-9896784)
 * Do you know if it works with WPForms?
 *  Thread Starter [RiaanC](https://wordpress.org/support/users/riaanc/)
 * (@riaanc)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-registration-from-gravity-forms/#post-9896909)
 * No sorry. I have not tested that.
 *  [Johnathan.PRO](https://wordpress.org/support/users/evanspress/)
 * (@evanspress)
 * [8 years ago](https://wordpress.org/support/topic/custom-registration-from-gravity-forms/#post-10140010)
 * // Setup Gravity Forms Memberships Hooks
    add_action( ‘gform_user_registered’,‘
   saf_cc_add_custom_user_meta’, 10, 4 ); function saf_cc_add_custom_user_meta( 
   $user_id, $feed, $entry, $user_pass ) { $time_period = trim($entry[8]);
 *  if($feed[‘form_id’] != 1) {
    return; }
 *  $user = get_user_by( ‘id’, $user_id );
    if(!empty($user)) { $current_time = 
   current_time(‘timestamp’); if($time_period == ‘One Day for $15|15’) { $new_time
   = ‘+1 day’; } else if ($time_period == ‘One Week for $30|30’) { $new_time = ‘
   +1 week’; } else if( $time_period == ‘3 Months for $250|250’) { $new_time = ‘
   +3 months ‘; } else if ($time_period == ‘6 Months for $500|500’) { $new_time 
   = ‘+6 months’; } else if ($time_period == ‘1 Year for $800|800’) { $new_time 
   = ‘+1 year’; } else { $new_time = ”; }
 *  $time = strtotime($new_time, $current_time);
    $default_settings = array ( ‘default_to_role’
   => ‘subscriber’, ‘reset_password’ => false, ’email’ => false, ’email_admin’ =
   > false, ‘remove_expiry’ => false, );
 *  $updated = update_user_meta($user_id, ‘_expire_user_settings’, $default_settings);
   
   $updated = update_user_meta($user_id, ‘_expire_user_date’, $time ); $updated 
   = update_user_meta($user_id, ‘_expire_user_expired’, ‘N’ );
 *  }
    }
 * function my_expire_users_expired( $user ) {
    //may be we need it in future }
 * add_action( ‘expire_users_expired’, ‘my_expire_users_expired’ );tions here */

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘CUSTOM REGISTRATION FROM – GRAVITY FORMS’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/expire-users_669999.svg)
 * [Expire Users](https://wordpress.org/plugins/expire-users/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/expire-users/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/expire-users/)
 * [Active Topics](https://wordpress.org/support/plugin/expire-users/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/expire-users/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/expire-users/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Johnathan.PRO](https://wordpress.org/support/users/evanspress/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/custom-registration-from-gravity-forms/#post-10140010)
 * Status: not resolved