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.
448
questions
0
votes
0
answers
9
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 ...
0
votes
0
answers
20
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 ...
2
votes
1
answer
768
views
@ngx-fomly Validation not working in custom input
I am using NGX-FORMLY @ngx-formly/bootstrap: "^5.0.0" for dynamic forms. It was working with default input types. But not working in case of custom input.
my custom Input.ts
import { ...
0
votes
1
answer
20
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',
...
0
votes
1
answer
27
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=&...
0
votes
0
answers
82
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 ...
0
votes
1
answer
219
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.
0
votes
1
answer
39
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: ...
0
votes
0
answers
28
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 ...
0
votes
1
answer
25
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[] {...
0
votes
0
answers
100
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 ...
1
vote
1
answer
98
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-...
0
votes
1
answer
89
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: [
...
0
votes
1
answer
2k
views
Angular Formly Forms - removing add/remove buttons from array type
I've got an issue trying to remove/disable buttons from a customized array component I use with Formly Forms when generating dynamic forms using a JSON schema (draft 7). I've tried various things to ...
1
vote
1
answer
1k
views
Angular CLI 8 - Formly custom select for JSON schema (draft 4)
I've got some difficulties getting my JSON schema (draft 4) to fully work with Angular-Formly forms custom templates. I've made several templates for various data types and I'm stuck with a template ...
1
vote
0
answers
28
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 ...
0
votes
0
answers
55
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&...
0
votes
0
answers
17
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,...
2
votes
0
answers
4k
views
Angular-Formly dynamically change select options
I would like to know if I could change select options using Angular-Formly depending on another select's selected value.
Lets say I have beverageTypeSelect and drinkSelect.
beverageTypeSelect has ...
0
votes
2
answers
32
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 } ...
0
votes
0
answers
122
views
How to show seperator between options in the formly form select?
A formly form is used to build a form in Angular which store company details. We just added a country drop-down to the form. I have to show country INDIA and nearest countries( as Favorite countries) ...
2
votes
1
answer
904
views
Using ExpressionProperties to access different model templateOptions
Firstly I would like to say Angular Formly is a fantastic library for novices such as myself. I am not a web developer, however find this library to be intuitive and powerful.
However I do need ...
0
votes
1
answer
559
views
Required property on a field doesn't change dynamically
One of my fields should be either mandatory(required) or not depending on one boolean variable. No matter if it changes or not the field stays required. Not sure what's wrong with my ...
0
votes
0
answers
45
views
Why am I getting this error on my custom inline validation function in angular formly: r.validation is not a function?
I am working with Angular formly and according to this site: https://formly.dev/guide/validation, I should be able to do this:
{
"id": "blah.blah.blah",
"key": "...
-1
votes
1
answer
157
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: ...
0
votes
1
answer
4k
views
How to use ngx-formly hideExpression to hide and display child elements based on parents value
I am new to angular formly
I want to use formly to build a form for the following scenario:
there are three sibling elements
out of which two elements are dependant on the value of one sibling ...
2
votes
1
answer
1k
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-...
0
votes
0
answers
157
views
Ng-Mask with formly for SSN in Angular
Basically I'm trying to populate hyphens in ssn and also trying to mask first 5 numbers with *.
Output expected
SSN Formly
I have built a custom type called mask and also given maskstring. You can ...
0
votes
0
answers
45
views
Autosaving working for entire form, only need to autosave after selecting a component in form
I have an Angular form that is saving the entire form instead of one component (Copy Schedule from Site) in the form. Is there a way to do that? My form setup is using formly in typescript and the ...
0
votes
2
answers
1k
views
Can't turn off Chrome autocomplete using Angular-formly
I found here that I cant turn off Chrome autocomplete. I do everything what I have to do, but Chrome's autocomplete still work. Can't understand where is my mistake and what I have to do to fix that.
...
0
votes
0
answers
114
views
how can I enable only certain dates with formly date-mask
We are working on an Angular application that uses formly forms. I have a requirement to create a date-mask or datemask-input field that, under certain conditions, the user can select only the first ...
1
vote
3
answers
1k
views
how to detect the checkbox checked event in formly angular7?
Using formly and Json I created one form. Now I want display a text box when I checked the check box.
I tried with ngDoCheck() method, but I was unable to display the text. The box.this method hitted ...
2
votes
0
answers
442
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 ...
1
vote
1
answer
415
views
Formly, primeng not able to set value of mindate(datepicker) in component using angular
I am using angular formly and primeng. I have FormlyFieldCalendar and AppComponent in place.
Setting the property of minDate in and initialiting the value in FormlyFieldCalendar with minDate works ...
0
votes
2
answers
1k
views
Angular 12 lazy loading module with Formly
I have problem with lazy loading module. Every time when I want to do it Formly thow me Error
ERROR Error: [Formly Error] The type "input" could not be found. Please make sure that is ...
0
votes
0
answers
116
views
We are using Material UI for the whole Angular project, can we use Formly with Bootstrap UI ? Does it create any problem?
We are using Material UI for the whole Angular project. Now we have to use Formly (https://formly.dev/) for forms. Can I use bootstrap theme in my project for styling the form fields ?
0
votes
0
answers
522
views
Angular Formly - Clearing Array Property of Model Based on Value of Another Field
I am using Formly for Angular in my app. The model of the form looks like this:
// ins-submission.ts
export class InsSubmission {
id: number | undefined;
empID: string = "";
...
0
votes
0
answers
360
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 ...
0
votes
1
answer
222
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">
<...
0
votes
0
answers
406
views
ngx-formly queries related to expression properties
In our angular application we are using the ngx-formly version 5.10.23
I have few question related to that
Are formly fields rendered synchronously? If it is happening asynchronously can we make this ...
0
votes
0
answers
45
views
How to add sorting and searching functionality in dynamically added table using ngx-formly in angular
I have just started using ngx-formly and added some dynamic controls to a page. I was wondering if there is a way to add sorting and searching functionality on a table dynamically created using ...
0
votes
0
answers
439
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 ...
-1
votes
1
answer
365
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 ...
1
vote
0
answers
456
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 ...
1
vote
0
answers
96
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"...
5
votes
4
answers
2k
views
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....
1
vote
2
answers
1k
views
how place the select (dropdown) elements from backend in angular formly
I am new to the angular formly .My requirement is to place the cities (coming from the backend )in dropdown but I have tried but I am unable to do this.
.service.ts
getcitiNames(): Observable<any&...
0
votes
0
answers
319
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 ...
0
votes
0
answers
306
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 ...