Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I was wondering is it possible to add an additional field on question?
I want to add another text field on all my question.
Nick
Yes it is possible Nick! Inside the Umbraco.Form.js you can add additional fields in the setting section of questions.
You need to modify the following code:
formResource.getPrevalueSources().then(function (resp) { vm.prevaluesources = resp.data; formResource.getAllFieldTypesWithSettings().then(function (resp) { for (var i = 0; i < resp.data.length; i++) { // add new setting here resp.data[i].settings.push({ name: "Extra Setting", alias: "extraSetting", description: "Enter in your message", prevalues: Array(1), view: "/App_Plugins/UmbracoForms/Backoffice/Common/SettingTypes/TextField.html" }); } vm.fieldtypes = resp.data; vm.ready = true; }); }); function openFieldTypePickerOverlay(field) { vm.focusOnMandatoryField = false; vm.fieldTypePickerOverlay = { view: "/app_plugins/UmbracoForms/Backoffice/Form/overlays/fieldtypepicker/field-type-picker.html", title: "Choose answer type", hideSubmitButton: true, show: true, submit: function(model) { //add new setting here model.fieldType.settings.push({ name: "Extra Setting", alias: "extraSetting", description: "Enter in your message", prevalues: Array(1), view: "/App_Plugins/UmbracoForms/Backoffice/Common/SettingTypes/TextField.html" }); formService.loadFieldTypeSettings(field, model.fieldType); // this should be removed in next major version field.removePrevalueEditor = true; vm.fieldTypePickerOverlay.show = false; vm.fieldTypePickerOverlay = null; } }; }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Adding an additional field to Umbraco Form questions
Hi
I was wondering is it possible to add an additional field on question?
I want to add another text field on all my question.
Nick
Yes it is possible Nick! Inside the Umbraco.Form.js you can add additional fields in the setting section of questions.
You need to modify the following code:
is working on a reply...