angular icon indicating copy to clipboard operation
angular copied to clipboard

Can we create new custom advance component in angular-formio

Open dslshweta opened this issue 8 years ago • 6 comments

We need to give flexibility to user to create new components and save them so that it can be reused.

Like I drag textfield and a number field. Now user should be able to save this both as a combination of their custom field. and would be able to reuse it by simply drag and drop. So on drggging this newly saved component, form will render textfield and a number field together.

How is it possible with Angular-formio

dslshweta avatar Jul 09 '18 10:07 dslshweta

@dslshweta check this issue

asalhani avatar Jul 14 '18 09:07 asalhani

Yes you can create custom components for the renderer. Here is an example of how it works.

https://gist.github.com/travist/59fa77086ec899e24992fc1508e61075

This will be making its way into our official documentation soon with some other examples, but until that happens please use this gist as a reference.

travist avatar Jul 17 '18 13:07 travist

@travist - I am getting error as Module not found: Error: Can't resolve 'formiojs/full' Module not found: Error: Can't resolve 'formiojs/lib/components/table/Table'

I am using dependencies having following versions : "formiojs": "^3.0.0-rc.7", "angular-formio": "^2.0.0-rc.2",

Moreover I would like to get this custom component on a builder so as to allow user to drag and drop this as any other component. and dismiss the popup that comes for setting field properties. Please suggest. screenshot-portal form io-2018 07 18-12-30-17 screenshot-portal form io-2018 07 18-12-28-43

dslshweta avatar Jul 18 '18 07:07 dslshweta

For me, this video was helpful https://www.youtube.com/watch?v=0yDCcX1IFVo In angular6, we can easily customize form builder, just give your own schema to option.builder property.

Example schema works well: http://formio.github.io/formio.js/app/examples/custombuilder.html

krixerx avatar Mar 08 '19 08:03 krixerx

@travist - I am getting error as Module not found: Error: Can't resolve 'formiojs/full' Module not found: Error: Can't resolve 'formiojs/lib/components/table/Table'

I am using dependencies having following versions : "formiojs": "^3.0.0-rc.7", "angular-formio": "^2.0.0-rc.2",

Moreover I would like to get this custom component on a builder so as to allow user to drag and drop this as any other component. and dismiss the popup that comes for setting field properties. Please suggest. screenshot-portal form io-2018 07 18-12-30-17 screenshot-portal form io-2018 07 18-12-28-43

got any solution?

shefeeqml avatar Nov 26 '19 06:11 shefeeqml

@shefeeqml Please open a new ticket for this issue and confirm details of the formio.js version you are using. Our latest 4x version is 4.7.7

jeriah-formio avatar Nov 26 '19 14:11 jeriah-formio