|
/ Documentation /Spectra 3 Beta/ Register Block In Spectra

Register Block In Spectra

Introduction

The Register Form Block allows you to create customizable user registration forms anywhere on your WordPress site. Perfect for membership sites, community platforms, or any site that needs user signups. The block provides extensive styling options and modular child components that you can arrange and customize to match your design needs.

How to Add or Use the Block in the Gutenberg Editor

  1. Adding the Block
    • Click the “+” button in the editor to open the block inserter
    • Search for “Register Form” or navigate to the Spectra Pro v2 category
    • Click on the Register Form Block to add it to your page
    • The block automatically creates a complete registration form with all necessary fields
  1. Working with Form Components
    • Click on any form element to select and customize it
    • The form includes these child blocks by default:
      • Welcome heading
      • Username input field
      • Email input field
      • Password input field with toggle visibility
      • Confirm Password input field
      • Submit button
      • Success and error message areas
  1. Adding Optional Fields
    • Use the “+” button to add optional child blocks:
      • First Name field (spectra-pro/register-first-name)
      • Last Name field (spectra-pro/register-last-name)
      • Terms and Conditions checkbox (spectra-pro/register-terms-and-conditions)
      • Login link for existing users

Block Architecture

The Register Form Block uses a parent-child relationship:

  • Register Form Block (Container): spectra-pro/register – Manages overall layout, colors, and form behavior
  • Child Blocks: Individual form components that inherit parent settings:
    • spectra-pro/register-user-name – Username input field
    • spectra-pro/register-email – Email input field
    • spectra-pro/register-password – Password input field
    • spectra-pro/register-confirm-password – Confirm password field
    • spectra-pro/register-first-name – First name field (optional)
    • spectra-pro/register-last-name – Last name field (optional)
    • spectra-pro/register-terms-and-conditions – Terms checkbox (optional)
    • spectra-pro/form-button – Submit button
    • spectra-pro/form-link – Login link
    • spectra-pro/form-message – Success/error messages
    • spectra-pro/form-recaptcha – reCAPTCHA component

Important: Child blocks inherit styling from the parent but can be customized individually.

General Settings

OptionDescriptionAvailable Settings
Show LabelsDisplay field labelsOn/Off toggle
Show IconsDisplay icons in input fieldsOn/Off toggle
Show Password ToggleAllow showing/hiding passwordOn/Off toggle
Overall AlignmentForm alignmentLeft, Center, Right
Button AlignmentSubmit button alignmentLeft, Center, Right
Form WidthMaximum width of form containerCustom width with units

Field Labels and Placeholders

OptionDescriptionDefault Value
Username LabelLabel for username field“Username”
Username PlaceholderPlaceholder text“Enter username”
Email LabelLabel for email field“Email Address”
Email PlaceholderPlaceholder text“Enter your email”
Password LabelLabel for password field“Password”
Password PlaceholderPlaceholder text“Enter password”
Confirm Password LabelLabel for confirm password field“Confirm Password”
Confirm Password PlaceholderPlaceholder text“Confirm your password”
First Name LabelLabel for first name field“First Name”
First Name PlaceholderPlaceholder text“Enter first name”
Last Name LabelLabel for last name field“Last Name”
Last Name PlaceholderPlaceholder text“Enter last name”
Register Button LabelButton text“Register”
Login Link LabelLink text“Already have an account? Login”

Color Settings

Label Colors
OptionDescriptionAvailable Settings
Label ColorDefault label text colorColor picker
Label Color HoverLabel text color on hoverColor picker
Input Field Colors
OptionDescriptionAvailable Settings
Input Text ColorText color inside input fieldsColor picker
Input Text Color HoverText color on hoverColor picker
Input BackgroundInput field backgroundColor picker
Input Background HoverBackground on hoverColor picker
Placeholder ColorPlaceholder text colorColor picker
Icon Colors
OptionDescriptionAvailable Settings
Icon ColorColor for input field iconsColor picker
Fields Icon SizeSize of field iconsDefault: 16px
Eye Icon SizeSize of password toggle iconDefault: 16px
Eye Icon ColorPassword toggle icon colorColor picker
Button Colors
OptionDescriptionAvailable Settings
Button Text ColorSubmit button text colorColor picker
Button Text HoverText color on hoverColor picker
Button BackgroundButton background colorColor picker
Button Background HoverBackground on hoverColor picker
Link Colors
OptionDescriptionAvailable Settings
Link ColorColor for login linkColor picker
Link Color HoverLink color on hoverColor picker
Message Colors
OptionDescriptionAvailable Settings
Success BackgroundBackground for success messagesColor picker
Success Text ColorText color for success messagesColor picker
Error BackgroundBackground for error messagesColor picker
Error Text ColorText color for error messagesColor picker
Form Container Colors
OptionDescriptionAvailable Settings
Background ColorForm container backgroundColor picker
Background GradientContainer gradient backgroundGradient picker
Background HoverContainer background on hoverColor picker
Gradient HoverContainer gradient on hoverGradient picker

Layout and Spacing Settings

OptionDescriptionAvailable Settings
PaddingInternal spacingTop, Right, Bottom, Left (Responsive)
MarginExternal spacingTop, Right, Bottom, Left (Responsive)
BorderForm container borderWidth, Style, Color, Radius
Box ShadowShadow effectsMultiple shadow layers

Advanced Features

User Registration Settings

OptionDescriptionAvailable Settings
New User RoleDefault role for new usersSubscriber, Contributor, Author, etc.
After Register ActionsWhat happens after registrationAuto-login, Email verification
Enable Email VerificationRequire email verification before loginOn/Off toggle

Security Settings

OptionDescriptionAvailable Settings
Enable reCAPTCHAAdd spam protectionOn/Off toggle
reCAPTCHA TypeVersion to usev2, v3

Note: reCAPTCHA requires configuration in Spectra Pro settings with valid site and secret keys.

Custom Messages

OptionDescriptionDefault Value
Success MessageMessage shown on successful registration“Registration successful! Please check your email to verify your account.”
Invalid Email ErrorMessage for invalid email format“Please enter a valid email address.”
Email Missing ErrorMessage when email is not provided“Email is required.”
Email Already Used ErrorMessage when email is already registered“This email is already registered.”
Invalid Username ErrorMessage for invalid username“Please enter a valid username.”
Username Missing ErrorMessage when username is not provided“Username is required.”
Username Already Used ErrorMessage when username is taken“This username is already taken.”
Invalid Password ErrorMessage for weak password“Password must be at least 8 characters long.”
Password Confirm ErrorMessage when passwords don’t match“Passwords do not match.”
Terms ErrorMessage when terms not accepted“You must agree to the terms and conditions.”
Other ErrorGeneric error message“An error occurred. Please try again.”

Demo Messages

OptionDescriptionAvailable Settings
Show Demo Success MessagePreview success message in editorOn/Off toggle
Show Demo Error MessagePreview error message in editorOn/Off toggle
Show Demo Field Error MessagePreview field error messages in editorOn/Off toggle

Email Verification Settings

When email verification is enabled:

OptionDescriptionDefault Value
Email Template TypeTemplate to useDefault, Custom
Email SubjectVerification email subject“Welcome! Please verify your email”
Email MessageVerification email body“Thank you for registering. Please click the link below to verify your email address.”

Device-Specific Settings

SettingDesktopTabletMobile
Font Size✓✓✓
Padding✓✓✓
Margin✓✓✓
Border Width✓✓✓
Border Radius✓✓✓
Icon Size✓✓✓

Tips and Best Practices

Security Guidelines

  • Always Use HTTPS: Ensure your site uses SSL certificates
  • Enable reCAPTCHA: Protect against spam registrations
  • Email Verification: Verify email addresses to prevent fake accounts
  • Strong Password Policy: Enforce minimum password requirements
  • Limit User Roles: Set appropriate default user role (usually Subscriber)
  • Keep WordPress Updated: Ensure WordPress core and Spectra Pro are up to date

Design Guidelines

  • Clear Visual Hierarchy: Make the submit button stand out
  • Adequate Spacing: Use block gap for better readability
  • Mobile Optimization: Test form on mobile devices
  • Error Visibility: Ensure error messages are clearly visible
  • Accessible Colors: Maintain sufficient color contrast
  • Progress Indication: Show clear feedback during registration

User Experience Tips

  • Show Password Toggle: Help users verify their password entry
  • Password Requirements: Clearly indicate password requirements
  • Confirm Password: Require password confirmation to prevent typos
  • Clear Error Messages: Help users understand validation errors
  • Login Link: Provide link for users who already have accounts

Field Recommendations

Required Fields (minimum for registration):

  • Username or Email
  • Password
  • Email (if username is used)

Optional but Recommended:

  • First Name and Last Name (for personalization)
  • Password confirmation (prevent typos)
  • Terms and Conditions acceptance (legal protection)

Avoid:

  • Too many required fields (reduces conversion)
  • Unclear validation requirements
  • Asking for sensitive data upfront

Accessibility Features

Built-in Accessibility

  • Semantic HTML form structure
  • Proper label associations
  • ARIA attributes for screen readers
  • Keyboard navigation support
  • Focus indicators
  • Error message announcements
  • Required field indicators

Keyboard Controls

  • Tab: Navigate forward through form fields
  • Shift + Tab: Navigate backward through form fields
  • Enter: Submit form
  • Space: Toggle checkboxes and password visibility

Troubleshooting

Registration not working?

  • Check if user registration is enabled in WordPress settings
  • Verify email delivery is working on your server
  • Check for plugin conflicts
  • Ensure form is not cached
  • Verify redirect URLs are valid

Email verification not sending?

  • Check WordPress email settings
  • Verify SMTP is configured correctly
  • Check spam folder
  • Test email functionality with plugins like WP Mail SMTP
  • Review server email logs

Styling not applying?

  • Clear browser and server cache
  • Check theme compatibility
  • Use browser inspector for CSS conflicts
  • Verify no custom CSS is overriding

reCAPTCHA not showing?

  • Configure reCAPTCHA keys in Spectra Pro settings
  • Verify reCAPTCHA version matches your keys
  • Ensure site key is for the correct domain
  • Check if browser extensions are blocking it

Validation errors not showing?

  • Enable “Show Demo Field Error Message” to preview
  • Check browser console for JavaScript errors
  • Verify error message colors have sufficient contrast

Username/Email already exists errors?

  • This is normal – WordPress prevents duplicate usernames and emails
  • Ensure error messages clearly communicate this to users

Frequently Asked Questions

Q: Can I customize individual form fields? 
A: Yes! Select any child block to customize its specific settings while inheriting parent colors.

Q: How do I make First Name and Last Name required? 
A: Add these optional child blocks to your form. Each field has its own required setting.

Q: Can I change the default user role for new registrations? 
A: Yes, use the “New User Role” setting to select from available WordPress roles.

Q: Does email verification work automatically? 
A: When enabled, WordPress will send a verification email. Ensure your server can send emails.

Q: Can I add custom registration fields? 
A: The block supports standard WordPress registration fields. Custom fields require additional plugins or custom code.

Q: What happens after someone registers? 
A: You can configure “After Register Actions” to either auto-login the user or require email verification first.

Q: Can I redirect users to different pages based on their role? 
A: The block provides a single redirect URL. For role-based redirects, you’ll need additional plugins.

Q: How do I prevent spam registrations? 
A: Enable reCAPTCHA and consider email verification. You can also use additional anti-spam plugins.

Q: Can I customize the verification email template? 
A: Yes, set “Email Template Type” to “Custom” and edit the subject and message fields.

Q: What is the minimum password requirement? 
A: By default, WordPress requires passwords to be at least 8 characters. You can modify this with additional plugins.

WordPress Settings

Important: Ensure user registration is enabled:

  1. Go to Settings > General in WordPress admin
  2. Check “Anyone can register” option
  3. Set “New User Default Role” (typically Subscriber)

Related Documentation

For user login functionality, see the Login Form Block documentation.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page

Get Notified When Available

Note - You can purchase the Essential Toolkit now and easily upgrade to the Business Toolkit once it becomes available.

Get your hands on Spectra Pro

Enter your name and email address to get access to Spectra Pro.