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.

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.

Tutorials

452 questions
23
votes
3 answers

Angular-Formly : Adding Form fields dynamically on user click

How would I go about adding the capability in the form so that the user can add more input fields by clicking the "Add". This using the angular formly library. Here is an example of the exact feature but done using only angularjs. Adding form fields…
Masood Alam
  • 645
  • 2
  • 8
  • 22
19
votes
2 answers

Function calls are not supported in decorators but 'FileTypeModule' was called

trying to setup ngx-formly-material-file, but I got an error: Function calls are not supported in decorators but 'FileTypeModule' was called I tried to export FileTypeModule, but got the same error export const fileTypeModule =…
Sh eldeeb
  • 1,589
  • 3
  • 18
  • 41
14
votes
3 answers

Angular-formly custom Validation on multiple fields on a repeat section

I was trying to create a custom validator for angular-formly repeated section. The form should be valid only if the sum of the percentage inputs is 100. So for example if repeat section has 2 fields 50 and 50 should be a valid option or 25 and 75…
George Nikolaides
  • 1,386
  • 12
  • 21
8
votes
2 answers

meaning of :: in angular formly

i'm trying to learn how to work with angular firmly and i'm having trouble understanding some of the syntax used in the guides and examples on the official website. when defining a button form control i saw this template:
Dror Cohen
  • 125
  • 7
7
votes
2 answers

How to implement an onChange function on a select box in formly with bootstrap

After reading quite a few posts I decided that this ought to work: vm.model.myChange = function(element) { console.log(element); } .. and in the vm.fields: { "key": "transportation", "type": "select", "templateOptions": { "label": "How do you…
user1712240
  • 131
  • 1
  • 2
  • 8
6
votes
2 answers

Angular material date picker format locale

I have created an angular material date picker component to use with formly, and tried to set it to use GB for the locale so that dates are shown as 26/07/2019. However, when typing in the date, it parses as US still, resulting in invalid date…
Sam Willis
  • 4,001
  • 7
  • 40
  • 59
6
votes
2 answers

Wait until my FormlyFieldConfig has finished loading

I am running into an issue where I'm trying to use UI elements before they've completely loaded, resulting in undefined exceptions. The form is loaded in the components constructor, and then I call the initializeElements method to work with the UI…
Martelyn
  • 83
  • 1
  • 5
6
votes
2 answers

Validation error message doesn't appear for custom DatePicker Angular Formly field

I'm trying to use Angular Datetime Picker as a Angular Formly input type. I've got it working such that I can edit and set a value that is correctly added to the binded model. However, I can't get the validation error messages to display like on the…
Oskar Persson
  • 6,605
  • 15
  • 63
  • 124
5
votes
1 answer

Cannot install formly "Cannot read property 'kind' of undefined"

This question may looks dumb, but like two weeks ago, I had no problems with installing it. Now it looks like that: ng add @ngx-formly/schematics --ui-theme=material I tried install it after/before material and cdk modules, but the result is the…
Wiktor Kujawa
  • 595
  • 4
  • 21
5
votes
1 answer

Formly access to form control value onChange

I'm trying to evaluate Formly. This is my first attempt - I want to call a method when the value of a textarea change. This is the code I tried with - so far it doesn't appear to be working I'm not sure If my syntax for the templateOptions is wrong…
cparrish817
  • 351
  • 4
  • 10
5
votes
4 answers

Empty fields not included on form submit when using Angular Formly

Using Angular Formly I've setup the following controller and template. I get the controller to print the values that the user has entered into all the fields, except those that the user hasn't touched. This means that if the user doesn't write…
Oskar Persson
  • 6,605
  • 15
  • 63
  • 124
5
votes
2 answers

Add a custom message to a formly field after submit

I have a formly form of which I do not know what validation errors I will receive in advance. So, my plan: submit the form to the server, get errors back if they exist, then add the error message to the field in question. My code is this: /*…
yesman
  • 7,165
  • 15
  • 52
  • 117
5
votes
1 answer

Custom template and ng-click Angular Formly

I have a problem with a custom template that I made using Angular Formly. The template has one input text and two buttons for decrease and increase the model value of this input. The problem is that the down button works and decrease the model…
5
votes
1 answer

Angular-Formly: Interacting with multiple forms in multiple directives

i'm trying to figure out how to save and react on multiple forms in multiple directives. To give you a short overview: Screenshot of the current view I've got three tabs containing forms and a fourth containing a JsTree (Groups). Each of the three…
jhend
  • 51
  • 3
5
votes
1 answer

angular-formly issue with ui-select

I am trying to use Angular-Formly together with angular ui-select using $http for results. The options should refresh as the user types in. When I set the model from another text input, the ui-select updates correctly and show the corresponding…
Andy
  • 351
  • 1
  • 2
  • 12
1
2 3
30 31