formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
648 stars 473 forks source link

[Custom Components] Problem with advanced logic #1045

Open adhonay opened 10 months ago

adhonay commented 10 months ago

abrir chamado com bug da logica adicional

Environment

Please provide as many details as you can:

image

I created several customized components, as done in the documentation, but I have a serious problem.

If I add any type of advanced logic, the custom component starts to disregard all the logic I implemented in the editform.

For example:

image

Does anyone know how I can configure my logic implemented via code in editform along with formio's advanced logic?

Configuring my customcomponent.formio.ts image

To simulate the error, simply create a customized component, add any logic to that component's editform file, and later create advanced logic through the configuration modal. The logic created in the editform file will not work, nor will it even execute.

muneebahmad0600 commented 10 months ago

Hi... @adhonay, I hope you are doing well. I have just started working on a custom component and am struggling to create one. I need to create a component that will call an API with the input value added in the edit form. would you be able to share how you created your custom component? documentation is not that great and I can't find an example for this.

adhonay commented 1 month ago

Hi... @adhonay, I hope you are doing well. I have just started working on a custom component and am struggling to create one. I need to create a component that will call an API with the input value added in the edit form. would you be able to share how you created your custom component? documentation is not that great and I can't find an example for this.

Now that I saw your question, were you able to resolve it?

I received the notification when they marked the @lane-formio and @Sidiro23 no error.

And I still don't know if it was resolved, I had to stop the project precisely because there was a conflict in the custom components and additional logic native to Formio.

lane-formio commented 2 weeks ago

Would it be possible to provide a code sandbox to help triage this?

muneebahmad0600 commented 2 weeks ago

Hi... @adhonay, I hope you are doing well. I have just started working on a custom component and am struggling to create one. I need to create a component that will call an API with the input value added in the edit form. would you be able to share how you created your custom component? documentation is not that great and I can't find an example for this.

Now that I saw your question, were you able to resolve it?

I received the notification when they marked the @lane-formio and @Sidiro23 no error.

And I still don't know if it was resolved, I had to stop the project precisely because there was a conflict in the custom components and additional logic native to Formio.

Hi @adhonay, I was able to create the custom component. although there are some intermittent issues we face from time to time, like custom components stop rendering but a quick refresh fixes that. Although this does become time-consuming at times.

The other thing is, because we need to override the edit form to add out own fields to it, the advance logic stops working. There are some other issues as well. I believe you have mentioned that advance logic has problems. I was just wanted to double-check if you were able to figure it out or if there is a hack for that.