question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Override Component Labels?

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JRiggenbachcommented, Apr 21, 2020

@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 { …`

0reactions
lfbertuccicommented, Oct 19, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Override Component Labels? #517 - formio/angular - GitHub
Is there any way possible to override the label names via the edit form override config? I attempted the following on the Data...
Read more >
How to Override Existing React Components | Pluralsight
You can override the props, the style, and the component for each and every internal element. The overriding process is quite easy. Once...
Read more >
How to override CSS for a label that is part of a composite ...
I'm new to CSS and have a question that I don't seem to find any answer for it. I have a composite component,...
Read more >
Apply overrides to instances - Components - Figma Help Center
It's not possible to make changes to the underlying structure of an instance. You can't override: The order, or z-index, of any layers...
Read more >
Label Override For Field-Mapped Flow Screen Component
Label Override For Field-Mapped Flow Screen Component ... The new (beta as of posting this Idea) Field-Mapped Flow Screen components is a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found