Skip to content

Instantly share code, notes, and snippets.

@mathetos
Last active October 2, 2019 00:29
Show Gist options
  • Save mathetos/d6873adb64c4f93b91403447ece59fbd to your computer and use it in GitHub Desktop.
Save mathetos/d6873adb64c4f93b91403447ece59fbd to your computer and use it in GitHub Desktop.

Revisions

  1. mathetos revised this gist Oct 2, 2019. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions row_classes.php
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,10 @@
    add_action( 'caldera_forms_grid_row_class', function($rowClass, $row, $config ){

    //Change your field ID here
    if( ('CF12345' == $config[ 'form_id' ]) && ( 6||7||8==$row ) ){
    $rowClass .= ' documents';
    if('CF5d8ceba87e343' == $config[ 'form_id' ]){
    if( $row==4 || $row==5 ) {
    $rowClass .= ' documents';
    }
    }
    return $rowClass;
    }, 10, 3 );
  2. mathetos created this gist Oct 2, 2019.
    10 changes: 10 additions & 0 deletions row_classes.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    // Add .documents class to divs of the Employee Onboarding Caldera Form

    add_action( 'caldera_forms_grid_row_class', function($rowClass, $row, $config ){

    //Change your field ID here
    if( ('CF12345' == $config[ 'form_id' ]) && ( 6||7||8==$row ) ){
    $rowClass .= ' documents';
    }
    return $rowClass;
    }, 10, 3 );