Comments (6)
I have figured out that Alpaca for whatever reason attempts to load fields containing URL's even when the fields are marked as type "text", if the URL's are not valid then Alpaca throws up obnoxious errors stating that it could not load the urls. It should not be trying to load these urls at all this is extremely unwanted behavior and renders the whole thing useless for any sort of application where the text field content may contain data that looks like a URL.
from alpaca.
One solution and perhaps an improved design would be to introduce new configuration properties - dataSource, schemaSource and optionsSource. These would let you specify that the data, schema and/or options should be loaded from an external source.
The data, schema and options properties would then be reserved for direct data only.
The *source properties could take a URI or they could take a function that passes in a callback to receive the loaded data.
Do you think this design would improve Alpaca? Would it help your use case?
from alpaca.
Hi, I have this issue too. I'm trying to understand the rationale behind fetching that data, could you explain it?
from alpaca.
There was a checkin over the weekend that addressed this in the master branch.
The "schema", "options", "data" and "view" properties are simply data properties. If you supply values that look like URIs, they are no longer assumed to be data sources and loaded.
Instead, Alpaca now supports four new properties - "schemaSource", "optionsSource", "dataSource" and "viewSource" that let you supply URIs, functions or other configuration for your Connector. The default connector assumes URIs and loads from remote sources.
The rationale behind the support of dynamic loading is so that you can quickly build forms that utilize schema, field configuration, layouts and more from a back-end system. In our case, we utilize Cloud CMS. JSON Schema also supports some of this mechanism with it's notion of $ref fields and hyper-schemas.
While the attempt to use URI detection in the core "schema", "options", "data" and "view" properties was clever, I don't think it was ever sophisticated enough to be worthwhile. It just got in the way and I think it created an obstruction for folks who simply wanted to represent values.
This will be included in the next release which I hope will be tomorrow morning. That said, for now, you can try building from master. Could you give it a shot and let us know how it works?
Cheers!
from alpaca.
This has been implemented in 1.1.0 which is now released. As such, Alpaca now allows for URI values without any problem. If you run into any issues, feel free to re-open or submit another issue.
from alpaca.
Any one working on dependencies in alpaca wizard? I'm facing a default issue can any one help me out? Suppose a case where parent is a select menu with yes/no ; on selecting 'YES' child text box is shown which is required fields after touching the fields (error shown :This is a required field) npw user just updates the parent option to 'NO' keeping the previous page validation as it is. In this case next button does not allow to navigate to next step.
Thanks in advance,
Pratiksha
from alpaca.
Related Issues (20)
- Layout/template for ArrayField items?
- format: uri does not accept an IP address HOT 1
- Multiselect order
- Add new item in Array object with multiple selected
- Plans on proceeding with broken TAG-field?
- [Ask] change helper text color
- [Ask] Accessing options of a field from another field
- How do I trigger the per-field validation chain when ANY field changes on the form?
- "too much recursion" with jQuery 3.4 using enum
- textarea data not being set properly
- Missing null checkes
- When Creating A Form Builder, How do I make the checkbox multiple select to be true as default? HOT 1
- Conditional Dependency failing
- Field is excluded in the Alpaca.getValue() when dependent on hidden field
- Unable to set uploaded images in postRender
- Repo Future? HOT 3
- After load form and the first running function in the 'events > change' in the select field the validation stops work
- Is this a bug with the "valid" and "invalid" callbacks inside a View?
- Alpaca Gitana
- $('MyForm').alpaca() causes "Maximum call stack size exceeded" for specific Select Field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpaca.