Override Component Labels?
See original GitHub issueIs there any way possible to override the label names via the edit form override config? I attempted the following on the Data tab -> Persistence key but nothing changed.
editForm: { textfield: [ { key: 'display', ignore: false, components: [ { key: 'placeholder', ignore: true} ]}, { key: 'data', ignore: false, components: [ { key: 'persistent', ignore: false, label: 'Save Where?', values: [ { label: 'None', value: false }, { label: 'Patient Profile', value: true }, { label: 'Patient and Vendor', value: false}], }, ], }, ], },
If not, I would be interested possibly making a pull request to extend the config override for label names, but would likely need a little kick in the right direction. I’m scouring through WebformBuilder.js at the moment and see some things around this options…is this a good starting point? Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
@firadisaad You might be getting stomped by Typescript. Try adding a declare statement for Formio and set the type to any
`import { Component, AfterViewInit, ViewChild, ElementRef } from ‘@angular/core’; import { FormManagerConfig } from ‘angular-formio/manager’; import { FormBuilderComponent } from ‘angular-formio/core’; import { ActivatedRoute } from ‘@angular/router’; import { editForm } from ‘@questionnaire/formioConfig’;
declare var Formio: any;
const TextFieldComponent = Formio.Components.components.textfield; TextFieldComponent.editForm = () => editForm;
@Component({ selector: ‘app-questionnaire-builder’, templateUrl: ‘./questionnaire-builder.component.html’, styleUrls: [‘./questionnaire-builder.component.scss’], }) export class QuestionnaireBuilderComponent implements AfterViewInit { …`
Hi, sorry for this reply so late, but I’m facing the same problem, trying to change de default labels from editForm.
I managed to change the editForm function from textfield directly in component, but the labels doesn’t change. @JRiggenbach can you provides some example?
I appreciate it. thks