Created
February 11, 2016 05:21
-
-
Save awakekat/09371465e119dca7f6ff to your computer and use it in GitHub Desktop.
Add classes to Gravity Forms fields based on the type of field (i.e. address, name, email, etc.) In functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add field type class to Gravity Forms fields | |
add_filter( 'gform_field_css_class', 'gf_field_type_classes', 10, 3 ); | |
function gf_field_type_classes( $classes, $field, $form ) { | |
$classes .= ' gfield_' . $field->type; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment