PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. 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.

Allow user to add new field

  1. I'd like my users to be able to add a product field with a plus button, but I can't figure our how. Picture demonstrating what I'd like to do (Look at the add a sensor button):
    http://imgur.com/G6TXv

    And here's what I've got now.

    http://sensarisupdated.bramblingdesign.com/store/

    Thanks,

    Tim

    Posted 12 years ago on Tuesday January 17, 2012 | Permalink
  2. Richard Vav
    Administrator

    What you could do is replace those dropdowns with one list field with multiple columns enabled call column one something like 'sensor type' and column two 'quantity' then add the following to your functions.php file you will need to change that input id to match the input id shown on your list field in the admin. so at the moment it is referencing form 1, field 2, column 1 and then just add as many choices as you require.

    add_filter("gform_column_input_1_2_1", "set_column", 10, 5);
    function set_column($input_info, $field, $column, $value, $form_id){return array("type" => "select","choices" => "ECOsense,ECO2sense,ECO3sense");}
    Posted 12 years ago on Wednesday January 18, 2012 | Permalink