Can a universal solution be developed for PDF Forms? The example in the documentation suggests this, but the acrofield names and their quantities are already known here
public firstName = 'Jane';
public lastName = 'Doe';
public country = 'Spain';
public jobExperience = '6';
public typeScript = true;
public get formData(): { [fieldName: string]: string | number | boolean } {
return {
firstName: this.firstName,
lastName: this.lastName,
yearsOfExperience: this.jobExperience,
typeScript: this.typeScript,
country: this.country
};
}
public set formData(data: { [fieldName: string]: string | number | boolean }) {
this.firstName = data.firstName as string;
this.lastName = data.lastName as string;
this.jobExperience = data.yearsOfExperience as string;
this.country = data.country as string;
this.typeScript = data.typeScript === 'true' || data.typeScript === true;
}
Is it possible to pass a list of strings containing the acrofield names and then connect them to these formData set and get methods? What would be the best approach?
I attempted to use a map, but when I tried to assign it similarly, the extension stopped working. I believe this method is not suitable, any recommendations?