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.

Display form list field input + textarea

  1. Hello,

    Is it possible to display a list with to fields like this:

    field 1: normal input
    field 2: textarea

    Posted 6 years ago on Thursday November 8, 2012 | Permalink
  2. The list field currently supports text fields or drop downs. Textarea is not included:
    http://www.gravityhelp.com/documentation/page/Gform_column_input

    Currently supported field types are "select" (Drop Down) and "text" (Text Field)

    Posted 6 years ago on Thursday November 8, 2012 | Permalink
  3. Isn't possible to change the list field field types foreach field? Or some kind of hack? (only for front end display)

    Posted 6 years ago on Thursday November 8, 2012 | Permalink
  4. Solved:

    added the following to common.php

    [php]
    private static function get_list_input($field, $has_columns, $column, $value, $form_id){
    }
    
    case "textarea":
                    $max_chars = "";
                    $logic_event = self::get_logic_event($field, "keyup");
    
                    $tabindex = self::get_tabindex();
                    return sprintf("<div class='ginput_container'><textarea name='input_%d' id='%s' class='textarea %s' {$tabindex} {$logic_event} %s rows='10' cols='50'>%s</textarea></div>{$max_chars}", $id, $field_id, esc_attr($class), $disabled_text, esc_html($value));

    This adds only a display in the front end, you can also fill it normally with gform_field_value_

    Processing in wordpress admin is not added ( I will do this manually )

    Posted 6 years ago on Thursday November 8, 2012 | Permalink
  5. + edited following in gravityforms.js (added textarea)

    [js]
    function gformAddListItem(element, max){
    
        if(jQuery(element).hasClass("gfield_icon_disabled"))
            return;
    
        var tr = jQuery(element).parent().parent();
        var clone = tr.clone();
        clone.find("input, select, textarea").val("").attr("tabindex", clone.find('input:last').attr("tabindex"));
        tr.after(clone);
        gformToggleIcons(tr.parent(), max);
        gformAdjustClasses(tr.parent());
    }
    Posted 6 years ago on Thursday November 8, 2012 | Permalink
  6. We don't support modifying the plugin files. Please be sure to maintain your customizations going forward so they're not lost when you upgrade Gravity Forms.

    Posted 6 years ago on Friday November 9, 2012 | Permalink

This topic has been resolved and has been closed to new replies.