Hi, I'm trying to turn a couple of columns in my list field into drop downs. I found this documentation: http://www.gravityhelp.com/documentation/page/Gform_column_input, but I'm having trouble implementing it.
Tweaking the example given in the documentation, what I want to add is this:
<?php
add_filter("gform_column_input_2_1_2", "set_column_input", 10, 5);
function set_column($input_info, $field, $column, $value, $form_id) {
return array("type" => "select", "choices" => "Ewe,Ram");
}
?>
I've tried placing it in my theme's functions.php file, but haven't had any luck getting it to work (it either does nothing, or creates an error). I suspect it has something to do with a syntax mistake on my part (I'm not very php literate).
This is what my functions.php file (I'm using a child theme of Vigilance, so this is the Vigilance functions file) looks like before I place anything into it:
<?php
//Set language folder and load textdomain
if (file_exists(STYLESHEETPATH . '/languages' ))
$language_folder = (STYLESHEETPATH . '/languages' );
else
$language_folder = (TEMPLATEPATH . '/languages' );
load_theme_textdomain( 'vigilance', $language_folder);
//Add support for post thumbnails
if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );
//Redirect to theme options page on activation
if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" )
wp_redirect( 'themes.php?page=vigilance-admin.php' );
// Required functions
if (is_file(STYLESHEETPATH . '/functions/sidebars.php' ))
require_once(STYLESHEETPATH . '/functions/sidebars.php' );
else
require_once(TEMPLATEPATH . '/functions/sidebars.php' );
if (is_file(STYLESHEETPATH . '/functions/comments.php' ))
require_once(STYLESHEETPATH . '/functions/comments.php' );
else
require_once(TEMPLATEPATH . '/functions/comments.php' );
if (is_file(STYLESHEETPATH . '/functions/vigilance-extend.php' ))
require_once(STYLESHEETPATH . '/functions/vigilance-extend.php' );
else
require_once(TEMPLATEPATH . '/functions/vigilance-extend.php' );
?>
Can you tell me where in this I need to place my gform code (and if I need to change the code any)? Thank you for any help!
This is the form in question: http://openmic.hazelandwren.com/test-form/