Home > Forum > Plugins > FormFieldExtensionJS: Issue after migrating from 2023.1.2 to 2023.1.3

FormFieldExtensionJS: Issue after migrating from 2023.1.2 to 2023.1.3
0

MVP

Hi,

does someone of you use a FormFieldExtensionJS for a multiline text field? We used this one to store a JSON as a string and in 2023.1.3 the plugin no longer works.

I haven't checked the WEBCON BPS JS code in 2023.1.2 but in the new version:
1. the change function in the plugin triggers controller.change
2. this calls validateCCValueModel
3. Since the hasCustomModel is undefined
4. The default validation is applied and this validation fails.

In the "past" I returned a string and now it seems that an Object is expected with a "comments" array.

I see no option to set "hasCustomModel" to true. The "change" function (1) has only one parameter and I have no idea how I could triggere the "changeFormField" directly so that I could provide "options".

Has someone else run into this?

Edit:
In the mean time I changed the newData so that the checks are successful and I now stumbled about the fact, that the value is not stored in the field.

Best regards,
Daniel

MVP
In reply to: Tomasz Batko

Hi
We will analyze it.
Is this just part of the FormFieldExtensionJS UI or do you have some business logic as well?
If you have logic, are you using your own TValue model: FormFieldExtension<TConfig, TValue>?

Hi Tomasz,

thanks for the feedback.

I do have a business logic class, but no "official" model. I just converted the JSON object to a string in the REACT component and then deserialized the string in the backend again.

I used this simply to transfer the information to the backend. I didn't even save the value.

public override Task VerifySaveRestrictionsAsync(ControlSaveRestrictionsParams<FormFieldExtensionContext> args)
{
var fieldValue = args.Context.CurrentFormField.GetValue() as string;
// Clear the token.
args.Context.CurrentFormField.SetValue(null);


As soon as I find the time, I will test it using a real model.

Best regards,
Daniel