Open vkvisli opened 4 years ago
It should not be sending requests to the API if you just set just the form JSON, so this would require further investigation. Is it possible to create a JSFiddle showing the issue and that would expedite our investigation?
Actually, I can refer to the example provided in this repository's README: https://codepen.io/travist/pen/xVyMjo
Maybe I am just not getting something, but it appears that the same behavior occur here. The <form-builder/>
directive are only provided the form
attribute, but still, I can see that there is a request being sent. In fact, there seem to be two requests being sent; one returns 401 and one returning 204:
Maybe you could check if the same happens for you?
We will add this item to our planning to discuss and maybe prioritize resolution. Stay tuned.
We believe this is just our "Existing Resources" that is querying to determine what resource fields should be added. If you want to remove this feature, it will require a change from the community to add an option to disable it. We need it for the Form.io platform.
Could you elaborate a little on what you mean by "Existing Resources" and "what resource fields should be added". What does the request do exactly?
Also, do you know if this is also the case with the form builder provided by the formio.js repository?
The reason I am asking is that I have a case where I need my application to run in an isolated environment, and would therefore like it not to do any external requests.
When the form builder is embedded into your application (and also point to the Form.io project endpoint), it fetches the list of resources and their fields to add a new section called "Existing Resource Fields". You can see this in our commercial portal @ https://portal.form.io. This would just need to be turned off, but we do not have it as configurable. The good news is that this portion is open source, so please feel free to add that configuration for the open source implementations and we will accept it in the next builds.
Aha, I think I understand what you are saying now. Thank you for the explanation :)
The reason why I would like to prevent the request is that I don't actually have a Form.io project endpoint, and therefore the request is not necessary. In other words, I am only using the form builder as a local generator of form schemas.
Just as a final follow-up question on this: As you say, the form builder can point to a Form.io project endpoint, but is there any way of specifying that no project endpoint should be used? Or is this also not configurable?
You can see here the options to disable this functionality: https://github.com/formio/formio.js/blob/master/src/WebformBuilder.js#L311-L313
Hi,
I am using the
<form-builder/>
directive in my application and would like to store the produced form schema in my own back-end database. However, when loading the application, the form builder sends a request to the form.io API (api.form.io/form). How can I prevent the form builder from sending this request?This is currently how I have embedded the directive:
<form-builder form="vm.formSchema"/>
where
formSchema
refers to a property in my controller that holds the form schema object. I have experimented with the various scope attributes of the directive (e.g.src
,url
,options.noSource
), but I can't seem to understand how to do it correctly without any documentation of these attributes.Hope someone can help me with this, thanks :)