Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
@dannycallaghan may be you are looking for templateOptions.onChange (see http://docs.angular-formly.com/v8.0.0/docs/ngmodelattrstemplatemanipulator)
Danny Callaghan
Thank you @Jaygiri, I will have a play around with that.
hello, does somebody know if it's possible to have an input field with the type number and have commas instead of dots for decimal places?
Marcin Zapendowski
is possible to obtain angular-formly in the other format then UMD ?
R. van Twisk
@GravesDevelopment learn about internationalisation and localisation and you should find the right answers. It's not about comma vs dot.
Lucas Jahn
This message was deleted
Can I get a hint on how to populate the Async Select Options with Controller example with a default or known value. Im am using angular-formly
Vincent Ogloblinsky
Hi all, just a simple question, didn't found an answer on stackoverflow or github. Is it possible to dynamically change the value of className ?
Claudio Barca
Hi all, can I add to an application AngularJS 1.x Formly ? Do you support thi idea ? It is mature as code ? I think yes, and you ?
Danny Callaghan
Hello all. I need to add something to the data property of the options passed to the formly-form directive. This is an accepted thing to do, as the data property does exist on that object, along with formState, etc. However, when I get down to the template level, I have no access to that data property. All I'm allowed to see is options.formState. How can I grab a value from options.data within my templates? If I can't, I don't see the point of having that data property available. Any help would be great, thanks.
Danny Callaghan
OK, so I've managed to do it, but by editing formly.js itself (making upgrades a nightmare). This can't be right? Why have a data property on options if it can't be accessed from the templates? Where else would I want to access it?
Danny Callaghan
Quiet room :(
Vitaly Z@NYC
hi All
just started experiencing an issues with the code that hasnt changed in more than 6 months...

Here is the output:

TypeError: Cannot read property 'optional' of undefined
at apiCheck (angular-formly-templates-bootstrap.js:453)
at runApiCheckForType (formly.js:1980)
at runApiCheck (formly.js:1961)
at checkApi (formly.js:1941)
at new FormlyFieldController (formly.js:1264)
at Object.e [as invoke] (angular.js:4478)
at P.instance (angular.js:9136)
at K (angular.js:8248)
at g (angular.js:7680)
at angular.js:7555
any help would be greatly appreciated...
Franklin Dattein

Hi all,
is it possible to use Angule dependency injection with angular-formly?
I am trying to add a "remember me" functionality to a field, with somethigng like this:

watcher: {
                        listener: function (field, newValue, oldValue, formScope) {
                            if (newValue && localStorage) {

                                store.setItem('groupId-remember-me', newValue);

Where store is injected by angular-store.

@blade93ny Probably You are build project with last version of angular-formly-templates-bootstrap, this version has a bug. Just use a previous version.
Hi! In my project i may recieve some field errors in format: {'name': 'Too long', 'age': 'Must be number'}. How to show this errors belong fields if I use Formly Bootstrap Templates?
Adish Upadhyay
how to set the same value on select box field while editing the row using formaly
Hi, new to formly .. is it possible to call a function from another controller when a checkbox is checked?
another question is how to pass an event when a checkbox is checked?
Kannan Thangadurai
HI All, how to delete modeldata value while hide the field in angular formly?
Hi guys, question, anyone has an example of how to put a tooltip on an input field?
Hector Mota
how do you show a certain page in angularjs by roles let say if im admin I can see any template or directiver. if I am not an admin let say "userRoleFoo" I just can see some templates .
any Idea?
@apratina I have created an example for you: http://jsbin.com/qexekeg/5/edit?html,js,output

I made a custom field type so I could use Angular Material 2 templates and some custom stuff perhaps
So this is what I made

import { FieldType } from 'ng-formly';
import { Component } from '@angular/core';

    template: `
            <input mdInput [type]="to.type" *ngIf="!to.hidden" [formlyAttributes]="field" [placeholder]="to.placeholder" [formControl]="formControl"
                [min]="to.minLength" [max]="to.maxLength" [min]="to.min" [max]="to.max" [pattern]="to.pattern" />
export class InputComponent extends FieldType { }

I registered this in my module as:

            types: [
                { name: 'input', component: InputComponent },
                { name: 'date', component: DateComponent }

this does work, but when I create a field with a key and I have a model with the same key and a value, it doesn't show as the value of the input

what am I doing wrong?
If I do ng.probe on the input element it has a formcontrol with the correct value, so the form control is correctly bound to the input, but it is not showing
Hmm I notice this is for AngularJS and not Angular :(

Looking for some pointers on how to get formly to work well with the translate (formly-js/angular-formly#373)

I can't seem to get the radio labels to translate in this example - https://jsbin.com/tuniqe/2/edit?html,js,output

Narendran n
is it possible to load dropdown data after selecting one dropdown data
Erica Gucciardo
Yes , I've done that
Narendran n
Can give me the code you done.
Erica Gucciardo
Can you make an issue on GitHub. I could have time to answer but it's 2:45 am right now. Also I'll need to come up with a method which doesn't involve the custom forked code I wrote in the formly core (it's possible but still needs some tweaks)
Hi Guys, Does Angular Formly has Drag and Drop feature? I am looking for a form builder with Drag and Drop feature using Angular 1. Any suggestions for that?
Erica Gucciardo
Look at the GUI section on the docs. There are a few existing open source angular formly GUI
One has drag and drop
Thank You @egucciar . Using those open source libraries, Can I use angular formly fields to build the form and drap and drop to rearrange those fields ?
Erica Gucciardo
Look into those GUI projects to see if any suite your needs. Angular formly provides a framework , but form builder / drag and drop isn't provided by the library. I think one of the projects on the GUI page is essentially a drag and drop form builder, though
Hi Guys, Is it possible to make the form field label clickable. I want to edit the field properties on clicking field label. How can I do that ?
ashwini kumar
friends, for "checkbox" how to go from true/false to Y/N ...any pointers?
ashwini kumar
@ashwini1081_twitter perhaps i should come here often...after sending my previous message, i found this link https://stackoverflow.com/questions/31947557/getting-value-of-fields-on-submit and that solved my problem :)
@ashwini1081_twitter but if there is a better way, then please let me know
ashwini kumar
anyone? how do i bind my checkbox to values "Y" & "N" (not default true/false)?
Erica Gucciardo
Would use radios and options
Erica Gucciardo
Umm for checkbox you could do maybe like an interface with the model? I've done this before in a controller with dual $watches for the model and the value and a flag to prevent infinite loops. Not beautiful but it works :/
ashwini kumar
Thanks Erica