Replace the Sign Up Text in Registration Views

 The following snippet will replace the 'Sign Up' text in a registration view with your own text:

  

/* Replace .view_8  with your own View ID or replace it with .any to target ALL registration forms. */

$(document).on(‘knack-view-render.view_8’, function (event, view, data) {

$('div.kn-register .view-header h2').text('Register Here');

});

  

I tried this CSS on my app and it's not working. Has it been updated again?

Another update the CSS has been modified so this should now be: 

 

/* Replace .view_384 with your own View ID or replace it with .any to target ALL registration forms. */

$(document).on('knack-view-render.view_384', function (event, view, data) {

$('div.kn-login-form .register .button').text('Register');

});

For future reference, this post: https://support.knack.com/hc/en-us/community/posts/220703988-Redirecting-the-Sign-Up-link-on-a-login-form-  shows you how to change the URL of these registration links

Sure James - The password page doesn't have a specific view ID so we need to use the '.any' event. We also want to target the #knack-reset-pass form instead:

  

 $(document).on('knack-view-render.any', function (event, view, data) {
$('div#knack-reset-pass .view-header h2').text('Set your own Password Here');

});

  

Hey Nicolas — Can this be done to replace the text on the password reset page as well?

Hi Stevan,

You could do this with some CSS. Assuming the 'Employee' sign-up link is the SECOND link listed:

 

a.register:nth-child(2) {
    display:none;
    }

 

You can target specific links by specifying the child number.

Hope this helps!

Hi Nicolas, 

I have several types of users  both internal and external. Some of my pages are accessible to both user profiles.

I would like to remove "sign up as an employee" from all login forms and keep only "sign up as a customer". Any way I can achieve this?

Hello, I’ve tried this on my app however it’s not working. Further can I confirm if it needs to be added to the Custom CSS or Javacript area it needs to be added to?

To change the Sign Up button text on all Login Pages, you can add this to your JS:

// Changes the Sign Up button text on all Login forms
$(document).on('knack-view-render.any', function(event, view, data) {
  const signUpButton = $('a.register')
  const hasSignUpButton = $('a.register').length
  if (hasSignUpButton) {
    signUpButton.text('Register') // 'Register' or 'Create Account' etc.
  }
})

To change it on a specific form, you can replace “any” with the specific view e.g. view-123

To change the text on a Registration Form, this can be done directly in the Builder.

If you have any questions let me know. :+1:

Ian
Knack Pros

That’s working perfectly now thank you!

1 Like