Created
September 12, 2014 16:17
-
-
Save zachskaggs/de1783feaebb70461182 to your computer and use it in GitHub Desktop.
Ninja Forms Field Chunk Wraps
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
<?php | |
function example_group_open_wrap( $field_id, $data ) { | |
if( $data['class'] == 'class1' ) { | |
echo '<div class="my-fields-group">'; | |
} | |
} | |
add_action ( 'ninja_forms_display_before_field', 'example_group_open_wrap', 1, 2 ); | |
function example_group_close_wrap( $field_id, $data ) { | |
if( $data['class'] == 'class2' ) { | |
echo '</div>'; | |
} | |
} | |
add_action ( 'ninja_forms_display_after_field', 'example_group_close_wrap', 1, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment