Examples that illustrate uses of form-js.
bpmn-io / form-js-examples Goto Github PK
View Code? Open in Web Editor NEWA collection of form-js examples.
A collection of form-js examples.
Examples that illustrate uses of form-js.
We should add one (or more) examples of how to create custom form elements.
This should include
Some helpful resources:
Give our users good examples of consuming our custom form elements API.
Related to bpmn-io/form-js#123
Depends on bpmn-io/form-js#776
if wrap playgroundForm in preact component - it work fine
if then add custom component from sample - got error in NumberField
export function App() {
useEffect(() => {
const container = document.getElementById('anchor');
console.log(container);
new FormPlayground({
container,
schema,
data: {},
});
}, []);
return (
<div id="anchor" />
)
}
new FormPlayground({
container,
schema,
data: {},
// load rendering extension
additionalModules: [
RenderExtension
],
// load properties panel extension
editorAdditionalModules: [
PropertiesPanelExtension
]
});
no error, custom component work as in custom-sample
I've encountered a problem when trying to integrate a custom component into FormEditor. I was following an example for FormPlayground, but when using it within FormEditor, selecting the custom Range component in the UI throws an error.
formEditorRef.value = new FormEditor({
container: document.querySelector('#form-editor'),
additionalModules: [
RangeExtension,
PropertiesPanelExtension,
],
});
The custom component should be available and functional within the form editor without any errors.
When selecting the custom Range component in the interface, the following JavaScript error is displayed:
Uncaught TypeError: Cannot read properties of undefined (reading '__H')
Version of bpmn-io/form-js: 1.7.0
Version Vue.js: 3.2.45
Can't build custom components in production mode
We've made some changes to how form-fields work by extracting a few properties to be computed in the form-field parent class. This may be worth documenting here as per bpmn-io/form-js#808 (comment)
How would the form-js viewer be integrated with Angular forms?
My current customer has already built a custom tasklist for Camunda Platform using Angular. They already have Camunda's REST API integrated to query and complete tasks. For very simple forms, it would be great to design them using form-js as it is included in Camunda Modeler. One could then imagine letting the form keys of the user tasks reference the JSON form definitions for the tasklist to load them.
Could you provide a code example of how the form-js viewer would interact with the Angular programming model?
We should add the playground to our starter examples.
Offer an easy entry point on how to consume the form-js-playground.
Also cf. to other examples in bpmn-io projects
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.