Last active
June 14, 2019 11:22
-
-
Save Shelob9/3a8cf70d69dca4a0e673efd69a8832f3 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Add a special class to the 2nd row of Caldera Forms grid layout | |
*/ | |
add_action( 'caldera_forms_grid_row_class', function($rowClass, $row ){ | |
//change to your desired row number here | |
if( 2 == $row ){ | |
$rowClass .= ' taco'; | |
} | |
return $rowClass; | |
}, 10, 2 ); |
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 | |
/** | |
* Add a special class for all rows of Caldera Forms grid layout, for a specific field | |
*/ | |
add_action( 'caldera_forms_grid_row_class', function($rowClass, $row, $config ){ | |
//Change your field ID here | |
if( 'cf12345' == $config[ 'form_id' ] ){ | |
$rowClass .= ' taco'; | |
} | |
return $rowClass; | |
}, 10, 3 ); |
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 | |
/** | |
* Change the formatting of row ID for Caldera Forms grid layout | |
*/ | |
add_action( 'caldera_forms_grid_row_id', function($rowID, $row ){ | |
$rowID = 'caldera-taco-' . $row; | |
return $rowID; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment