Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom signup fields setting #765

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

joshcanhelp
Copy link
Contributor

Changes

Remove database-stored extra signup fields setting for the embedded login form. Custom fields must now be added by enqueueing a JS file before the embedded form loads:

function namespace_login_enqueue_scripts() {
        // This example assumes that this file is loaded from your theme.
	wp_enqueue_script( 'lock-signup-fields', get_stylesheet_directory_uri() . '/assets/js/lock-signup-fields.js' );
}
add_action( 'login_enqueue_scripts', 'namespace_login_enqueue_scripts' );

... that defines a specific global variable wpAuth0LockGlobalFields with the signup fields defined:

// lock-signup-fields.js
var wpAuth0LockGlobalFields = [
  {
    name: "full_name",
    placeholder: "your full name",
    validator: function(address) {
      return {
        valid: address.length >= 10,
        hint: "Must have 10 or more chars" // optional
      };
    }
  }
];

Checklist

  • All existing and new tests complete without errors
  • All code quality tools/guidelines in the Contribution guide have been run/followed
  • All active GitHub CI checks have passed

@joshcanhelp joshcanhelp requested a review from a team January 30, 2020 00:40
@joshcanhelp joshcanhelp added this to the 4.0.0 milestone Jan 30, 2020
@joshcanhelp joshcanhelp merged commit 948801a into master Jan 30, 2020
@joshcanhelp joshcanhelp deleted the remove-lock-signup-fields-setting branch January 30, 2020 14:11
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants