Gravity Forms Social Fields
Validate social profile fields by specifying a CSS Class Name
by Katz Web Services, Inc. · github.com/gravitykit/social-fields · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/gravitykit/social-fields/archive/refs/heads/main.zipReadme
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 inkws_gf_validate_social_accounts. Returns boolean.kws_gf_is_valid_twitterandkws_gf_is_valid_facebookare set by the plugin already, but you can also hook in.kws_gf_validate_social_accountsArray of social networks to check. Lowercase.kws_gf_validate_social_invalid_messageArray of error message strings for the social network. Set key to be the same as thekws_gf_validate_social_accountskey. If there's an error message specified in the field, it will be used instead.