I am looking to use the gform_column_input_content filter to make a repeatable file upload element. The filter modifies the HTML content of the list field column input tag.
The following code provided from the docs shows how to replace the default text input with a textarea input.
<?php
add_filter("gform_column_input_content_21_9_3", "change_column3_content", 10, 6);
function change_column3_content($input, $input_info, $field, $text, $value, $form_id){
//build field name, must match List field syntax to be processed correctly
$input_field_name = 'input_' . $field["id"] . '[]';
$tabindex = GFCommon::get_tabindex();
$new_input = '<textarea name="' . $input_field_name . '" ' . $tabindex . ' class="textarea medium" cols="50" rows="10"></textarea>';
return $new_input;
}
?>
I want to replace this with a File Upload field, but I'm pretty much stumped as where to go from here. Surely just filtering the File Upload elements HTML won't result in a working File Upload element?