Gform column input content


This filter can be used to modify the HTML content of the list field column input tag.


add_filter("gform_column_input_content", "change_content", 10, 6);

You can also target a specific column by adding the form id, field id and column number after the hook name. (format: gform_column_input_content_FORMID_FIELDID_COLUMN)

//This filter declaration targets the third column of the field whose id is 9 in form whose id is 21
add_filter("gform_column_input_content_21_9_3", "change_column3_content", 10, 6);


(string) The current HTML content of the List field column
(array) The input info array to be filtered, in the following format:
array("type" => "select", "choices" => "First Choice,Second Choice");

//OR, if values need to be specified for each choice, the following format can also be used:
array("type" => "select", "choices" => array(
            array("text"=>"First Choice", "value"=>"First"),
            array("text"=>"Second Choice", "value"=>"Second")
(Field Object) Current field.
(string) Current column name.
(string) Currently entered/selected value for the column's input.
(int) ID of current form.


This example changes the third column of the list field to a textarea. To display the value on the entry in the admin, make sure you include using $value in the appropriate location for your tag creation.

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">' . $value . '</textarea>';
	return $new_input;


This code should be placed in the functions.php file of your active theme

Source Code

This filter is located in common.php

Search the Documentation