Please Note: We are no longer using forums to facilitate standard support. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Help with Gform Column Input

  1. dvent
    Member

    Following on from an earlier post from Carl, I have read the Gform Column Input section of the help.

    Within my themes functions.php file I now have the following:

    <?php
    	add_filter("gform_column_input_2_4_1", "set_column", 10, 5);
    	function set_column($input_info, $field, $column, $value, $form_id)
    	{
        	return array("type" => "select", "choices" => "First Choice,Second Choice");
    	}
    ?>

    Form ID is 2
    Field type is list
    Field ID is 4
    Field contains 2 columns (1 & 2)
    Column I want drop-down in is 1

    I would expect to see column 1 now showing as a drop down with the values First Choice & Second Choice being available, but I do not.

    Can anyone point out my error?

    Thanks
    dvent

    Posted 3 years ago on Tuesday February 14, 2012 | Permalink
  2. Richard Vav
    Administrator

    The filter looks correct just one question though is that code snippet the only thing in your functions.php file, if it isn't you will need to delete the opening and closing php tags shown on lines 1 and 7 in your snippet above before it will work.

    Posted 3 years ago on Tuesday February 14, 2012 | Permalink
  3. dvent
    Member

    Hi richardvav,

    It is not the only code in my functions.php file.

    Dave

    Posted 3 years ago on Tuesday February 14, 2012 | Permalink
  4. Richard Vav
    Administrator

    Hi Dave,

    In that case if you delete the opening and closing php tags shown on lines 1 and 7 of the snippet in your first post, save the file and preview your form it should now be working.

    Posted 3 years ago on Tuesday February 14, 2012 | Permalink
  5. dvent
    Member

    Aha! It works.

    Thanks richardvav

    Posted 3 years ago on Tuesday February 14, 2012 | Permalink
  6. Richard Vav
    Administrator

    No problem, glad you got it working.

    Posted 3 years ago on Tuesday February 14, 2012 | Permalink

 

Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only