Edit: 13/9/13
There is now a demo of adding a datepicker to a list field column over at http://gravity.wawrzyniak.me/list-field-with-datepicker/
Using the gform_column_input_content filter the list field can now use different input types such as text fields, http://www.gravityhelp.com/documentation/page/Gform_column_input_content
I haven't tried this so I have no idea if it would work but in theory you could use something like this to change the column to a date field
add_filter("gform_column_input_content_21_9_3", "change_column3_content", 10, 6);
function change_column3_content($input, $input_info, $field, $text, $value, $form_id){
//build field name, must match List field syntax to be processed correctly
$input_field_name = 'input_' . $field["id"] . '[]';
$tabindex = GFCommon::get_tabindex();
$new_input = '<input name="' . $input_field_name . '" ' . $tabindex . ' class="datepicker medium mdy datepicker_no_icon hasDatepicker" >';
return $new_input;
}
The hard part is going to be activating the datepicker ui on the dynamically added rows, which I think would require use of the jquery .on method.
Posted 11 years ago on Tuesday March 5, 2013 |
Permalink