WCK Single Metabox just got better

wck-small-banner

Creating custom fields with our WordPress Creation Kit plugin has just become simpler.

We’ve redesigned the way Single Metaboxes work, reducing the number of steps required for adding content.

WCK’s Custom Field Creator allows you to create single or repeater metaboxes.

One of WCK’s strong points is the ability to create repeater fields as well as repeater groups. This is super helpful when you need to add multiple custom fields or groups of custom fields of the same kind, without knowing the exact number.

This repeater metabox attached to "Our Team" page allows you to add as many team members as you need.

This repeater metabox attached to “Our Team” page allows you to add as many team members as you need.

WCK Single Metabox Improvements

The problem was that because WCK was designed with repeater custom fields in mind, the Single Metabox design was adapted from the Repeater one.

Simply put, in the previous version, to add custom fields which are not repeatable (stored in a single metabox) you needed to click the “Add Entry” button for each one of the custom field groups attached to a post, page or CPT. Only after doing this, you could “Publish” the page/post and have the saved custom fields attached to it.

Here we're using a Single Metabox attached to an Events CPT to add event details stored in custom fields.

Here we’re using a Single Metabox attached to a Events CPT to add event details stored in custom fields.

Only after clicking the "Add Entry" button custom fields data is saved.

Only after clicking the “Add Entry” button custom fields data is saved and you can go ahead and “Publish” the event.

If however you forget to click the “Add Entry” button after adding content in the custom fields and simply click Publish, the custom field data will not be saved and the single metabox content will be empty. An alert of unsaved data may have helped, but it was still going half-way.

This was a serious usability issue which needed improvement. In the redesigned WCK Single Metaboxes, we rethinked the way Single Metaboxes are built, so that we can remove the “Add Entry” button altogether. This eliminates an extra step and simplifies the data entry process.

The NEW Single Metabox:

NEW Single Metabox design eliminates the redundant "Add Entry" button.

The NEW Single Metabox design eliminates the redundant “Add Entry” button.

This redesign impacts and simplifies the WCK UI as well. Based on WCK API, some WCK modules (like Custom Fields Creator, Front-end Posting etc.) were using the single metabox format as well.

This basically means that from now on creating custom content types with WCK will require less steps and fewer clicks.

Note: The improved WCK Single Metabox is available starting with WCK version 1.1.4.

Import / Export WCK Settings addon

Another important addition is the Import / Export Settings addon. This makes it really easy for people working on two environments, to export all WCK Settings from the development site and import them on the live site.

No need to define the same metaboxes, taxonomies or custom post types twice, for both sites. Simply export them to as many sites as you need.

Download The Import And Export Add-On

Have any suggestions on how we can make WCK even better? Share your thoughts in the comments section below.

WYSIWYG User Field, now available in Profile Builder

The list of custom field types you can add to the user profile with Profile Builder has now expanded to include the WYSIWYG User Field.

Your users will now be able to add, edit and format their profile information making use of all the functionality of a Rich Text Editor. The same editor you’ve been used to when editing Posts and Pages in WordPress.

The WYSIWYG User Field is powered by WordPress default TinyMCE editor.

wysiwyg-field

The WYSIWYG field type allows you to add a Rich Text Editor field to the user profile (both front-end and back-end).


Read more

No CAPTCHA ReCAPTCHA Field for Profile Builder

Profile Builder’s reCAPTCHA field has been updated to the new and improved Google’s No CAPTCHA reCAPTCHA.

To simplify the reCAPTCHA experience the new field will simply ask users who want to register for your website whether or not they are robots.

Recaptcha_PB
Using the new reCAPTCHA API, a significant number of users will be able to securely register through the front-end forms created with Profile Builder and easily verify they are humans without actually having to solve a CATCHA.

With just a click, they can confirm they are not a robot.

reCaptcha-frontend-register

However, CAPTCHAs aren’t going away. When the risk analysis engine can’t confidently predict whether a user is a human or an abusive agent, it will prompt a CAPTCHA to increase the number of security checkpoints for confirming the user is valid.

reCaptcha-verification-registration

Besides the reCAPTCHA field, Profile Builder offers other features to help you fight user registration spam.

Note: The new No CAPTCHA reCAPTCHA will replace the old version, starting with Profile Builder Hobbyist or Pro v.2.1.0.
For a smooth transition, the reCAPTCHA field settings will remain exactly the same as in previous versions.

Email Confirmation Field Addon for Profile Builder

I’ve set up a user registration form and want to make sure I capture their correct email address.

icon-256x256

This is where the Email Confirmation Field addon comes in handy.

The registration form needs to have a second field for confirming the user’s email address, which is compared to the contents of the first one to catch any typos.

The Email Confirmation field is meant to check if the email address entered matches the first one, making sure a user submits a valid and correct email address.

Download and activate

First of all, click on the button below to download the add-on. Unzip the downloaded file and copy the contents in the wp-content/plugins directory.

Download Email Confirmation Add-On

Once the files are moved, head over to the Plugins section in your WordPress admin UI and activate the add-on.

Email Confirmation Field in action

Once the add-on is installed, the Email Confirmation field type will show up in the Manage Fields drop-down from Profile Builder. Select it and click “Add Field”.

email-confirmation-dropdown

By adding this field to the Manage Fields list, it will show up on the front-end user registration form created with Profile Builder.

The Email Confirmation field is “Required” by default, and will throw an error every time the two email addresses do not match.

Confirm Email Error on the front-end Register form.

Confirm Email Error on the front-end Register form.

User Field Visibility for Profile Builder

I would like to have some fields which are not visible, some fields visible but not editable for logged users.

icon-field-visibility-150x150

Did you ever wanted to have some admin only fields attached to your user profiles? Or fields that are editable by administrators and visible by your user?

Now it’s possible with a new addon for Profile Builder: Field Visibility

Profile Builder – Field Visibility Add-On

By default, extra fields created with Profile Builder can be visible and editable by all user roles both in the front-end forms or in the backend.

Now you can add extra fields that are only visible and editable by an administrator like:

  • admin notes about the user
  • custom ID to connect the user with another system
  • a custom category that only admins can add the users in

field_visibility

User Role based field visibility

Wouldn’t it be nice to have different profiles for different user roles?

Now this is possible with the User Role Visibility for fields.

If in the past you had to use the multiple edit profile forms to achieve this, the User Field Visibility Addon gives you the possibility to have a single edit profile form that displays different fields depending on what user role the current user has.

This applies to the backend Edit Profile page as well.

Note: User Field Visibility requires Profile Builder Pro or Hobbyist version 2.0.8 or higher.

Get Field Visibility for Profile Builder

Numbers and Phone Validation Addon for Profile Builder

I want to restrict an input field to be numerical How can I do that?

Zip codes, phone numbers, custom ID’s require the custom input field in a registration form to be made up of numbers only. That’s where this addon for Profile Builder comes in handy.

Download and activate

icon-150x150First of all, click on the button below to download the add-on. Unzip the downloaded file and copy the contents in the wp-content/plugins directory.

Download The Numbers Only Field Add-On

Please note: The Numbers and Phone Validation Add-On requires Profile Builder version 2.0.5 or higher.

Once the files are moved, head over to the Plugins section of the Dashboard and activate the add-on.

Enable Numbers or Phone Validation for a Custom Input

Once the add-on has been activated head over to the Manage Fields page in Profile Builder. If you select an input field you will see that a new property named Numbers Only appeared below the other properties.

numbers_phone_format

See it in action

Too see your work in action head over to the page where you display the register or edit form and type some letters into your new field and submit the form. You will get an error asking you to enter numbers only!

screenshot2

Manage WooCommerce Customer Fields with Profile Builder

Profile Builder WooCommerce Sync Add-on
Looking for a simple way to manage WooCommerce Customer Billing and Shipping Address fields with Profile Builder?

Now you can, using the Profile Builder – WooCommerce Sync Add-on.

Manage WooCommerce Customer Fields

By default, WooCommerce adds address fields, Customer Billing and Shipping Address to the user profile. But what if you want to capture more user information, as well as let users manage all their profile fields in one place?

When a user/customer registers or updates his profile via Profile Builder front-end forms, using this add-on he will now not only be able to fill in/edit the user fields created with Profile Builder, but also display and update the shipping and billing fields from WooCommerce.

Installing Profile Builder – WooCommerce Sync Add-on

After downloading, you can add the add-on using the standard WordPress plugin uploader and clicking “Activate”.

Woo-Sync-Addon-Install
Note: For the Profile Builder WooCommerce Sync add-on to work as expected, you’ll need to have already installed both Profile Builder and WooCommerce plugins.

Note: The Profile Builder – WooCommerce Sync Add-on requires at least Profile Builder 2.0.8, free or premium.

Adding WooCommerce Customer Billing and Shipping Address to User Profile

Once activated the Profile Builder – WooCommerce Sync Add-on will automatically add WooCommerce Customer Billing and Shipping Address fields to the Manage Fields list from Profile Builder. They will output all the individual fields required for WooCommerce Shipping and Billing Address in the front-end.

manage-fields-woo

You will be able to (re)arrange them, edit their heading (title) and in case you remove them, you can always add them later in the Fields drop-down.

manage-fields-woo-shipping-billing-small
The WooCommerce fields will now appear on both registration as well as edit profile pages managed with Profile Builder.

front-end-register-woo-fields1

Users registering through Profile Builder will be able to fill in the required WooCommerce Customer fields

The Edit Profile page will now allow your users to update WooCommerce Shipping and Billing information

The Edit Profile page will now allow your users to update WooCommerce Shipping and Billing information

So from now on, when a new user registers, you can give him access to add or modify the WooCommerce customer fields as well, all in one place.

Get the Profile Builder – WooCommerce Sync Add-On

WordPress Shortcode – Compare Values

icon-256x256

With both Profile Builder and WordPress Creation Kit plugins using Mustache as their template system for things like User Listing and Swift Templates, we need at times the possibility to compares different values.

This however, is not possible in Mustache. So a shortcode to compare values comes to the rescue.

Compare Shortcode

Download Compare Shortcode

How to use

[compare val1="test" val2="test" operator="=="]
    List if the values is the same?
[/compare]
 
// Inside Profile Builder or WordPress Creation Kit you'll probably use it like so:
[compare val1="{{my-custom-field-2}}" val2="Yes" operator="=="]
    List if the values is the same?
[/compare]

Code wise, it’s fairly straight forward. You can also see what operators are supported:

/*
 * Compare shortcode. Tags: shortcode, compare,
 * Usage:
	[compare val1="test" val2="test" operator="=="]
		List if the values is the same?
	[/compare]
 */
add_shortcode( 'compare', 'wppbc_compare_shortcode' );
function wppbc_compare_shortcode( $atts, $content ){
	extract(
		$out = shortcode_atts(	array( 'val1' => '', 'val2' => '', 'operator' => ''), $atts )
	);
 
	// quick fix for WordPress bug: https://core.trac.wordpress.org/ticket/29658
	foreach($out as $key => $value){
		$out[$key] = str_replace('”', '', $value );
	}
 
	$l = $out['val1'];
	$r = $out['val2'];
 
	$operators = array(
		'=='    => create_function('$l, $r', 'return $l == $r;'),
		'==='   => create_function('$l, $r', 'return $l === $r;'),
		'!='    => create_function('$l, $r', 'return $l != $r;'),
		'<'     => create_function('$l, $r', 'return $l < $r;'),
		'>'     => create_function('$l, $r', 'return $l > $r;'),
		'<='    => create_function('$l, $r', 'return $l <= $r;'),
		'<='    => create_function('$l, $r', 'return $l <= $r;'),
		'>='    => create_function('$l, $r', 'return $l >= $r;'),
		''      => create_function('$l, $r', 'return $l == $r;'),
	);
	if ( !array_key_exists($out['operator'], $operators ) ){
		return '<p>The compare operator <strong style="padding:0 10px;">' . $out["operator"] . '</strong> is not recognized. Please try: == , ===, !=, <, >, <=, >=';
	}
 
	$bool = $operators[$out['operator']]($l, $r);
	if( $bool ) {
		return $content;
	}
}

Multiple Admin Emails Add-On for Profile Builder

You may be well aware that WordPress sends by default a notification e-mail to the address that is set in the General Settings page of the Dashboard whenever a new user registers to your website. If you have a website where you manually approve new users this feature comes in handy .

But what if you have a whole team at your side that deals with new users? How do they get notifications? You may have a forwarding system in place, so that every time a new user registers, the notification email you receive is then sent to the others, or in a very worst case scenario you manually forward the emails yourself. In any case, there is now a better solution. Meet the Multiple Admin Emails Add-On for Profile Builder.

How it works

This little add-on adds a new option in the General Settings page of Profile Builder where you can type a list of email addresses that you wish to send notifications regarding users. Therefore when a new user registers notifications will be pushed to these addresses instead of the WordPress default.

Download and activate

Download The Multiple Admin Emails Add-OnIcon Multiple Admin Emails Add-On for Profile Builder

Please note: The Multiple Admin Emails Add-On requires Profile Builder version 2.0.6 or higher.

When your download is complete, you can upload the .zip file in the Add Plugins page of the Dashboard or you can unzip the file and copy its contents in the wp-content/plugins directory. Then simply navigate to the Plugins page and activate the Add-On.

Multiple Admin Emails Add-On for Profile Builder

Add the email addresses

You are almost done at this point. Navigate to the General Settings page of Profile Builder and you will see the new option named “Admin Emails”. Here you can type as many email addresses as you need, separated by comma. By default when you activate the plugin this option will be populated with the WordPress default email address.

Multiple Admin Emails Add-On for Profile Builder

Try it out

All done. From now on notifications regarding users will be sent to the addresses you’ve entered.

Maximum Character Length Add-On for Profile Builder

How can I limit the maximum number of characters a user can type in a field?

You may find yourself in the situation where you want your users to provide a postal code that is at most 4 characters long, or a description of themselves in less than 140 characters. In these cases the Maximum Character Length Add-On for Profile Builder comes in handy.

So to answer the above question, let me walk you through the 3 easy steps of getting this feature up and running.

Download and activate

icon-150x150First of all, click on the button below to download the add-on. Unzip the downloaded file and copy the contents in the wp-content/plugins directory.

Download The Maximum Character Length Add-On

Please note: The Maximum Character Length Add-On requires Profile Builder version 2.0.5 or higher.

Once the files are moved, head over to the Plugins section of the Dashboard and activate the add-on.

maximum-character-length-1

Set the maximum character length

Once the add-on has been activated head over to the Manage Fields page in Profile Builder. If you select an input field, a textarea field or the default biographical info field you will see that a new property named Maximum Character Length appeared below the other properties. All you need to do is set the desired value, in my case it was 10. You can also modify this value when editing one of these fields.

maximum-character-length-2

See it in action

Too see your work in action head over to the page where you display the register or edit form and type something in the field that has a maximum value set. Did it stop you from typing?