Questions tagged [angular-formly]

angular-formly is an AngularJS module which has a directive to help customize and render JavaScript/JSON configured forms. The formly-form directive and the formlyConfig service are very powerful and bring unmatched maintainability to your application's forms.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Angular Formly repeat section - Async model. Not working

I'm trying to create a custom repeat type for formly (for file uploads) that takes in a certain number of fields received from the server. I'm not sure I'm being clear but overall the "...
Martin Carre's user avatar
  • 1,167
-1 votes
1 answer
21 views

Angular Formly Form hook OnInit -> field.xxx is possibly undefined

Angular version: 16.0 Formly version: 6.1.8 I'd need to create a cascated select for my app. The first field is a Material Autocomplete and then the next one a simple select I'm struggling, however, ...
Martin Carre's user avatar
  • 1,167
0 votes
0 answers
16 views

Formly select from observable and server data doesn't show the value

I'm trying to have a formly select field display the existing value automatically but for some reason it doesn't show up. Here's a simplified example: stackblitz (formly's forked) and here's the code: ...
Martin Carre's user avatar
  • 1,167
0 votes
2 answers
20 views

Hide filed in Angular Formly

How to hide fields in formly , cause hide expression hiding the DOM by display:none which alter the position of other element in the current and previous rows . I have a requirement to hold on to the ...
Aravind's user avatar
1 vote
1 answer
71 views

Styling Formly Form Custom Wrapper + Custom Type

So I'd like to have a mat-autocomplete using formly-forms and have a add and delete button at the end of each autocomplete. Most importantly I want this "duo" of autocomplete + button to ...
Martin Carre's user avatar
  • 1,167
0 votes
1 answer
13 views

How to achieve that in the property of a model that expects an array the added value is kept within the array?

I have the following models. as you can see email expects a string array export interface Member { id: string; name: string; lastName: string; emails: string[]; } export type MemberPreview = ...
Mario's user avatar
  • 4,784
0 votes
1 answer
34 views

get the value in string date format instead of a value of type date when selecting a value of a formally custom type

I have created a formly custom form type. It's a primeng calendar Custom type component @Component({ selector: 'ts-multi-shl-siep-admin-global-formly-calendar-type', template: `<div> <...
Mario's user avatar
  • 4,784
0 votes
0 answers
31 views

Type 'any[] | Observable<any[]> | undefined' is not assignable to type 'any[]'

Body: I'm getting the following TypeScript error in my Angular application: error TS2322: Type 'any[] | Observable<any[]> | undefined' is not assignable to type 'any[]'. Type 'undefined' is not ...
Gaurav Raut's user avatar
0 votes
1 answer
53 views

Custom Formly Component not showing validation message on blur

I have a custom angular date picker component which uses ngb-datepicker and implements control value accessor. Now I create a formly component from this to use in my json form. This works fine but it'...
Emz's user avatar
  • 485
0 votes
1 answer
58 views

How to add tooltip to angular formly dropdown elements

I want to add tooltip to angular formly dropdown element, is there a way to solve this? Tool tip should contain label - value of the dropdown elements. Is there any tooltip property which we can use ...
Akash Gedam Patil's user avatar
0 votes
0 answers
107 views

Angular Material + Formly: Validation inside Nested Custom Types

I'm using Angular Material on a project right now, trying to implement the formly library with custom types. Right now I'm working on Signup, Login, Password Forget and Password Reset Feature. Since ...
Don's user avatar
  • 376
1 vote
1 answer
208 views

Get storybook to use local assets in a node_module for a story of a component with a tinymce editor?

I am writing an Angular 15 Application making use of the formly-package to generate forms for me. Formly provides most fields to render inside of its forms out of the box, but not a field with a rich ...
Philipp Doerner's user avatar
0 votes
1 answer
238 views

How to write a storybook story for a custom formly field?

I am writing an Angular 15 Application making use of the formly package to generate forms for me. Formly provides most fields to render inside of its forms out of the box, but not a file-field. So I ...
Philipp Doerner's user avatar
0 votes
1 answer
537 views

Formly form not fully updated after changing field default value

I am trying to update the Formly form rendering after making some changes in the form scheme (the array of FormlyFormConfig objects). It works when I add a new object or if I change a field label, but ...
Marc de Verdelhan's user avatar
0 votes
0 answers
113 views

how to use ngx-translate with formly-form to display dynamic error message

I am using formly in my angular application and ngx-translate for language translation. I have multiple form controls with some custom validation. I want to display error messages based on input field ...
lakhan khandelwal's user avatar
0 votes
0 answers
178 views

Using a formly field, I want to mask input value

{ "key": "accountNum", "type": "input", "className": "col-lg-6 inputClass", "templateOptions": { "...
Sonal Shinde's user avatar
0 votes
0 answers
70 views

Stopping JSON powered NGX-Formly ngFor loop overwriting previous forms in a grid on the same page

In the example below I have a Formly form wrapped in a ngFor loop.The last form model overwrites all the previous ones. How can I stop that behaviour? Parent that host the form loop: <div class=&...
John M.'s user avatar
  • 71
0 votes
0 answers
121 views

How do i implement the drag and drop form builder in angular application to the client with api interactions?

I have created an angular application that will let the client make their own forms using drag and drop method. I have implemented it with formio npm package which works fine . But when interacting ...
vijay s's user avatar
  • 157
0 votes
0 answers
414 views

Angular Formly custom cross field validation check

Hope I can get some advice here. I have a Angular Formly search form to search for client. The way of how the search form work is if ID is filled then 'surname' and 'date of birth' are not needed and ...
bunnap's user avatar
  • 37
0 votes
0 answers
124 views

ngx formly formArray without formcontrol

I have a requirement to create a typeahead component inside a form and storing the results of the search in an array. I am new to angular formly and am trying to achieve the ask using a formArray. I ...
Ravdeep Khanna's user avatar
0 votes
1 answer
243 views

Use @ngx-formly with custom radio component (internal UI components)

I am working with a custom radio components and I'm having a hard time connecting the component to the form using formly v5. This is how I would use the custom radio component <custom-radio name=&...
Erik's user avatar
  • 947
0 votes
0 answers
290 views

How to align Formly form-fields horizontally when using JSON Schema?

I use Formly form JSON schema to render my view. This way the inputs appear below the labels, yet I want the inputs to be displayed beside the labels. I know that form-field-horizontal can be used to ...
SushantRoy's user avatar
0 votes
1 answer
191 views

What is the way to assign a default value to the datepicker range component of angular material used in formly?

I am in the following way using the datepicker range component of angular material in formly component class form = new FormGroup({}); model: DashboardFilterModel = { criteria: '', category: ...
Mario's user avatar
  • 4,784
0 votes
1 answer
434 views

What is the way to update the option values of a select control from the value emitted by another control?

In a form similar to this formGroup = new FormGroup({}); modela!: any; fieldsa: FormlyFieldConfig[] = [ { key: 'field1', type: 'select', props: { label: 'Field1', ...
Mario's user avatar
  • 4,784
0 votes
1 answer
176 views

How to disable all formally controls?

I have a long form that looks similar to the following: ... export function directoryForm( countries: CountryModel[], dealers: DealerModel[], translate: TranslateService ): FormlyFieldConfig[] {...
Mario's user avatar
  • 4,784
0 votes
0 answers
62 views

Ngx formly form Multicheckbox - Angular 9

We are using ngx-formly form in our Angular 9 application. We have some issues with formly multicheckbox implementation. Since the multicheckbox value gets as an Object/ key-value pair. We convert it ...
Vargis.mithun's user avatar
0 votes
0 answers
295 views

How to set value of form control only after it is visible in Angular formly?

I have two radio button which has two values. On clicking of each value, two formcontrols get visible. Now I want to fill the value of those formcontrol. I am getting radiobutton selected based on ...
Shubhangi Garg's user avatar
1 vote
1 answer
393 views

How do I properly integrate angular material datepicker range in formly?

I am trying to integrate angular material datepicker range in formly To this end I am doing the following: I have created the following formally type Component: @Component({ selector: 'app-formly-...
Mario's user avatar
  • 4,784
0 votes
1 answer
274 views

How to unit test form validation on angular using ngx-formly

I'm using ngx-formly (on V5) to generate a form with an input and a checkbox (here is the FormlyFieldConfig): field: FormlyFieldConfig = { className: 'database-header', validators: { validation: [ ...
Sa Hagin's user avatar
  • 502
1 vote
0 answers
69 views

Remove empty option from angularjs angular-formly select

I recently upgraded my angularJs project from version 1.5.8 to 1.8.3. Since then I am seeing an empty option in the select drop down. How can I remove that option. I am using angular-formly for my ...
Kishore Koushik's user avatar
0 votes
0 answers
65 views

Hide options of a question on the basis of answer of previous question using ng-formly

formSchema:[ { "key" : "6332c96442b5f914f06e74ce", "type" : "radio", "hideExpression" : "", "templateOptions" : { "label&...
aniket kumar's user avatar
0 votes
0 answers
23 views

I am getting disabled Angular Spec file code lines

There is Angular spec file, in which I am trying to cover the lines, but these code line are disabled format. Any idea, what could be the reason for this. As a information. I am using formly component,...
SVinayaka's user avatar
0 votes
2 answers
174 views

what is the correct way to assign default values to a select multiple?

Update I was able to solve it by modifying the model so that only the role ids are listed in the roles property constructor(private readonly activatedRoute: ActivatedRoute) { const { user, roles } ...
Mario's user avatar
  • 4,784
1 vote
1 answer
427 views

Access to Angular Formly Material Datepicker

I want to access the formly datepicker to make it close after selecting the year. But Im not able to access the datepicer object. Can please anybody help? Thank you! fieldsOfMyForm: ...
Christoph Glaß's user avatar
2 votes
1 answer
2k views

How to hide fields of Formly form, due another model's fields

I have 2 Formly forms in my app. I need to hide a field of one form, due the value of a field in the another one. Formly documentation gives this option (https://formly.dev/examples/field-options/hide-...
Yehuda's user avatar
  • 41
3 votes
0 answers
553 views

how to add icon button and click event in formly form for material UI?

I have a select field which contains file name, i want a eye button above select field on right. I am using formly form and UI is angular material. how can i add eye button on right side above select ...
Vikash Mishra's user avatar
0 votes
0 answers
490 views

has-error not removed for fields having ng-touched class when removing validator using clearValidators()?

Dependencies used "@angular/cli": "^11.2.10", "@ngx-formly/bootstrap": "^5.10.22", "@ngx-formly/core": "^5.10.22" There is an issue with ...
AREH's user avatar
  • 11
0 votes
0 answers
581 views

Disabled checkbox(es) in Angular formyl

How can I disable the checkbox without displaying this warning message? "It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true. when you ...
Sofi's user avatar
  • 21
-1 votes
1 answer
570 views

Angular Formly - Focus on the first editable element

In our project, we used Angular Formly to generate complex forms (with complex grouping). I checked the component documentation, but I couldn't find any sample or solution for finding the first ...
Mironline's user avatar
  • 2,755
1 vote
0 answers
786 views

how to get which field clicked in formly-form?

I have a formly-form with icon addon wrapper. i want to get fields value when user clicked icon of that field. Look in Addon wrapper there is icon and onClick call showFile funtion and there want to ...
Vikash Mishra's user avatar
1 vote
0 answers
137 views

How to set max value dependent on other fields in Angular Formly?

I have two fields, e.g. x and y. I want the third field to have max value set to sum of the others. How to achieve this? max option doesn't work with this expression { "className"...
silviaa11's user avatar
0 votes
1 answer
354 views

How to focus first invalid ngx-formly field

I am using ngx-formly for creating dynamic form from field configuration. On submitting form, validation is showed correctly. I want to focus first invalid formly field.
Saad Khan's user avatar
  • 109
0 votes
0 answers
472 views

Angular Formly options value causes Placeholder bug

My options dropdown has a boolean value in this Formly field. Whenever the value is false, this causes the placeholder and the options label to be overlayed over each other. I don't have this issues ...
Vincent Thomason's user avatar
0 votes
1 answer
396 views

JSON value into FormlyFirldConfig of Formly Form

I am trying to add a json file formatted to fit the formlyconfig file but unable to do so Here is my HTML <div class="row"> <div class="col-md-4 mb-4"> <...
sharan r setty's user avatar
0 votes
0 answers
534 views

JSON Schema / Formly dependent sub-schemas

This issue is a bit tricky to describe so bear with me and please ask questions if I am missing anything... Say you have a json object that defines a list of features, each feature has a the same ...
Brandon's user avatar
  • 830
1 vote
0 answers
249 views

Ion-select multiple options but with one exclusive options

So I would like to create a ion-select with multiple options but with one option that is exclusive. Example : In this image, if I select Nowhere the other options deselect themselves and if I select ...
Mhystos's user avatar
  • 51
1 vote
0 answers
780 views

Angular Formly File Upload - File Path, Not Contents Being Displayed

I am attempting to build a form that allows for file uploads using Angular (v12) and Formly (v5). I have referenced Formly File Input example and implemented my solution accordingly. In app.module the ...
KellyM's user avatar
  • 2,472
2 votes
0 answers
375 views

Why formly-field doesn't render the component?

I made input component and render component in formly. This is simple thing: the app component is render the render-component and render-component is render the input component. But the input ...
Jon Sud's user avatar
  • 10.3k
0 votes
1 answer
803 views

How to change color of Angular Formly description?

I am working with angular formly. Here below is the Image of the Input Field and Its description. What issue I am facing? Initially the description attribute have some default color but I want to ...
Satyam Singh's user avatar
0 votes
1 answer
120 views

Force other components to run (change) before my button's (mousedown)

I have a button on formly with mousedown that has a method called "analyzeClick()" <button *ngIf="show" (mousedown)="analyzeClick()" id={{htmlID}}> {{label}} <...
Malcolm Salvador's user avatar

1
2 3 4 5
10