diff --git a/src/addon/mod/data/fields/url/providers/handler.ts b/src/addon/mod/data/fields/url/providers/handler.ts index 7e6ea803e..ae8eb55d5 100644 --- a/src/addon/mod/data/fields/url/providers/handler.ts +++ b/src/addon/mod/data/fields/url/providers/handler.ts @@ -40,6 +40,25 @@ export class AddonModDataFieldUrlHandler extends AddonModDataFieldTextHandler { return AddonModDataFieldUrlComponent; } + /** + * Get field edit data in the input data. + * + * @param {any} field Defines the field to be rendered. + * @param {any} inputData Data entered in the edit form. + * @return {any} With name and value of the data to be sent. + */ + getFieldEditData(field: any, inputData: any, originalFieldData: any): any { + const fieldName = 'f_' + field.id; + + return [ + { + fieldid: field.id, + subfield: '0', + value: inputData[fieldName] || '' + } + ]; + } + /** * Check and get field requeriments. *