Hello,
Is it possible to display a list with to fields like this:
field 1: normal input
field 2: textarea
Hello,
Is it possible to display a list with to fields like this:
field 1: normal input
field 2: textarea
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)
Isn't possible to change the list field field types foreach field? Or some kind of hack? (only for front end display)
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 )
+ 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());
}
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.