Skip to content
Snippets Groups Projects
Commit a3567beb authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #12636 TIME 0:10 fix init custom values

parent d66a1847
No related branches found
No related tags found
No related merge requests found
...@@ -382,10 +382,10 @@ export class ContactsFormComponent implements OnInit { ...@@ -382,10 +382,10 @@ export class ContactsFormComponent implements OnInit {
valArr = []; valArr = [];
field = this.contactForm.filter(contact => contact.id === 'customField_' + element.id)[0]; field = this.contactForm.filter(contact => contact.id === 'customField_' + element.id)[0];
if (field !== undefined) { if (field !== undefined) {
field.label = element.label; field.label = element.label;
field.type = element.type; field.type = element.type;
field.values = element.values.map((value: any) => {return {id: value, label: value}});
if (element.type === 'integer') { if (element.type === 'integer') {
valArr.push(Validators.pattern(/^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)$/)); valArr.push(Validators.pattern(/^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)$/));
field.control.setValidators(valArr); field.control.setValidators(valArr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment