Thanks in advance for any help that can be provided. I’ve been able to use the sample code listed here to create a dropdown in one of my columns. How do I add a second one to a second column in the same field? In other words, I have a list field with 4 columns, and I want 2 of them to have drop-downs.
I get a “Cannot redeclare set_column” message using this; I’ve tried some other options but no dice:
add_filter( 'gform_column_input_5_8_2', 'set_column', 10, 5 );
function set_column( $input_info, $field, $column, $value, $form_id ) {
return array( 'type' => 'select', 'choices' => 'Co-Teacher,Assistant' );
}
add_filter( 'gform_column_input_5_8_3', 'set_column', 10, 5 );
function set_column( $input_info, $field, $column, $value, $form_id ) {
return array( 'type' => 'select', 'choices' => 'Yes,No' );
}
Also, not terribly important, but what do the “10” and “5” designate in this code?