WP Manifestindependent plugin directory
manifest / forms / social-fields

Gravity Forms Social Fields

Validate social profile fields by specifying a CSS Class Name

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/gravitykit/social-fields/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Social Fields for Gravity Forms

A WordPress plugin. Requires Gravity Forms.

  • Validate social profile account names
  • Verify tweet URLS
  • Embed tweets as oEmbed in GravityView

Usage

In a field in Gravity Forms, click the Advanced tab, then enter in the CSS Class Name validate-twitter or validate-facebook.

Currently, Twitter validates username using regex to match the right pattern.

Facebook accepts handles and full URLs, then checks the username/page ID against https://graph.facebook.com/{handle/id}

Facebook verification requests are cached for a week.

Filters

  • kws_gf_is_valid_{$key} - Hook into this filter to validate different social networks defined in kws_gf_validate_social_accounts. Returns boolean. kws_gf_is_valid_twitter and kws_gf_is_valid_facebook are set by the plugin already, but you can also hook in.
  • kws_gf_validate_social_accounts Array of social networks to check. Lowercase.
  • kws_gf_validate_social_invalid_message Array of error message strings for the social network. Set key to be the same as the kws_gf_validate_social_accounts key. If there's an error message specified in the field, it will be used instead.