Style Locking

WS Form allows you to lock styles in WordPress to prevent accidental edits to colors, typography, spacing, and other style settings. Style locking is useful for styles that are already applied to live forms and should not be changed without authorization.

Only users with the necessary WordPress capabilities can lock or unlock styles. When a style is locked, it cannot be edited until it has been unlocked by an authorized user. Forms that use the style continue to display it, and submissions are not affected.

How to Lock a Style in WordPress

To lock a style:

  1. Navigate to WS Form > Styles in the WordPress administration menu.
  2. Locate the style you want to lock in the All view.
  3. Click the open padlock icon in the Lock column.
  4. Click Lock in the confirmation dialog.

Once locked, the padlock icon changes to a closed blue padlock.

What Does Locking a Style Do?

Locking a style protects its settings from accidental or unauthorized changes. It does not change how forms look or work on your website.

When a style is locked, the following actions are prevented:

  • Editing colors, typography, spacing, and other style settings.
  • Saving changes, undoing changes, or resetting the style.
  • Renaming the style.
  • Setting the style as the default style. In WS Form PRO, setting it as the conversational style is also prevented.
  • Replacing the locked style by importing another style over it.

If the current default style is locked, another style cannot be set as the default until that style is unlocked. The same applies to the conversational style in WS Form PRO.

Locking a style does not disable it. The following actions remain available:

  • Forms that use the style continue to display it.
  • The style can still be previewed.
  • The style can still be cloned. Cloned styles are unlocked by default.
  • The style can still be exported.
  • Forms can still be edited. A form can still be switched to or away from the locked style.

Note: Style locking does not lock forms. Form fields, settings, and conditional logic are managed independently of the style lock.

What Happens When You Try to Edit a Locked Style?

When you open a locked style, the styler controls are replaced with a locked style screen. This prevents changes until the style has been unlocked.

The screen displays This Style is Locked, together with an Unlock button if your WordPress user account has permission to unlock styles. If you do not have permission, the screen states that you do not have permission to unlock the style.

Save, undo, and style settings are hidden while the style is locked. You can still view the preview and return to the styles list without unlocking the style.

How to Unlock a Style in WordPress

To edit a locked style, you must first unlock it. WS Form provides two ways to unlock a style.

Unlock from the Styles List

  1. Navigate to WS Form > Styles in the WordPress administration menu.
  2. Locate the locked style.
  3. Click the closed padlock icon in the Lock column.
  4. Click Unlock to confirm.

Unlock from the Locked Style Screen

  1. Click the name of the locked style or its Edit link.
  2. Click Unlock on the locked style screen.
  3. Click Unlock in the confirmation dialog.

Once unlocked, the style can be edited again.

How to Lock or Unlock Multiple Styles

WS Form supports bulk locking and unlocking, so you can protect multiple styles without updating each style individually.

To lock or unlock multiple styles:

  1. Navigate to WS Form > Styles in the WordPress administration menu.
  2. Select the checkboxes next to the styles you want to lock or unlock.
  3. Select Lock or Unlock from the Bulk Actions dropdown.
  4. Click Apply.

Bulk locking and unlocking options are not available in the trash view.

Who Can Lock and Unlock Styles?

WS Form uses WordPress user capabilities to control who can lock and unlock styles. By default, administrators have permission to perform both actions.

The following capabilities control access to style locking:

  • lock_form_style Allows a user to lock styles.
  • unlock_form_style Allows a user to unlock styles.

These capabilities can be assigned to other WordPress user roles when you want to allow specific users to manage style locks.

If a user does not have permission to lock styles, the open padlock icon is hidden. If a user can view a locked style but does not have permission to unlock it, the closed padlock icon is displayed but cannot be clicked.