diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index ac7a579b76..c74c3e8ed9 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -132,7 +132,18 @@ angular.module('SurveyQuestionFormDefinition', []) type: 'text', addRequired: false, editRequired: false, - column: 2 + column: 2, + ngHide: 'type.type === "textarea" ' + }, + default_textarea: { + realName: 'default_answer', + label: 'Default Answer', + type: 'textarea', + rows: 3, + addRequired: false, + editRequired: false, + column: 2, + ngShow: 'type.type === "textarea" ' }, required: { realName: 'required_answer', diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js index 886f0cfbfe..566c2f7f50 100644 --- a/awx/ui/static/js/helpers/Survey.js +++ b/awx/ui/static/js/helpers/Survey.js @@ -564,6 +564,9 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', if(scope[fld]){ if(fld === "type"){ data[fld] = scope[fld].type; + if(scope[fld].type==="textarea"){ + data["default"] = scope.default_textarea; + } if(scope[fld].type==="integer" || scope[fld].type==="float"){ data[min] = $('#answer_min').val(); data[max] = $('#answer_max').val();