formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

A custom field with 2 field inside and a button for add 2 field in every click #759

Open falinsin opened 6 years ago

falinsin commented 6 years ago

Is there a way to create a field composed internally of 2 or 3 textbox and an add button? Pressing that button would always add 3 more fields.

I need to create a form that allows you to add contact persons. Each contact with 2 or 3 textbox for data like name, phone, etc... so the user can press the add contact button and add 3 more fields for another contact.

I do not know if it is possible to create that type of field for example by creating a template for those three fields and an add button. It is very important for my development that already uses angular-formly

egucciar commented 6 years ago

i used

https://github.com/markacola/angular-formly-repeating-section

http://angular-formly.com/#!/example/advanced/repeating-section