Gravity list field override and adding javascript [closed]

I tried for past few hours, I’m override the list field to drop down,

add_filter( 'gform_column_input_4_2_1', 'set_column', 10, 5 );
function set_column( $input_info, $field, $column, $value, $form_id ) {
    return array( 'type' => 'select','choices' => array(array('text'=>'1','value'=>1), array('text'=>'2','value'=>2))); 
}

And now i tried to add javascript or custom class, so i tried this

 add_filter( 'gform_column_input_4_2_1', 'set_column', 10, 5 );
    function set_column( $input_info, $field, $column, $value, $form_id ) {
        return array( 'type' => 'select','cssClass'=>'custom-class','choices' => array(array('text'=>'1','value'=>1), array('text'=>'2','value'=>2))); 
    }

but it’s not working. Please suggest me to add a class or javascript to each and every drop down in list.

0

Leave a Comment