Open johndavemanuel opened 5 years ago
Absolutely. The tutorial is not finished but you can create simple custom fields via options by adding it to elements
ex:
elements: [
{
tag: 'input',
config: {
label: 'Password',
disabledAttrs: ['type']
},
meta: {
group: 'common',
id: 'password',
icon: '***',
},
attrs: {
type: 'password'
},
},
]
Custom inputs like tinymce and cleave.js can be created using the above method with onRender
action to instantiate or by creating a custom control similar to formBuilder.
Great! Thanks! Also when I try to run the demo on my local I got an errror
TypeError: window.FormeoEditor is not a constructor formeo-master/demo/assets/js/demo.js:142
How can I fix this?
There is a bug in the current release I'm working on now causing that error. It will work if you run yarn start
from the repo otherwise you'll need to change the location of formeo.min.js in index.html
"you'll need to change the location of formeo.min.js in index.html"
Also trying yarn start is error
$ yarn clean && yarn copy
$ rm -rf dist/* demo/assets/formeo*
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I try it but still the same
ok i see. I should have made yarn clean
cross platform. rm
won't work on windows outside of WSL on Windows. Can you try the Ubuntu bash or Git shell? I need to focus on completing other features and docs but after will definitely focus on Windows support.
Is this issue already fixed?
@johndavemanuel , nope, as of today could not build on windows with PS or CMD. GIT Shell worked though.
Seems like there is still a bug in the latest. Building doens't provide you with a constructor for Formeo. Only the builder and the render classes.
I had to take the .js and .svg from the demo.
@jmorvan yes it is, I also do it from the demo,
It's sounds like this is a separate issue from custom fields. Can someone make a separate issue with the details? Prs also welcome.
I got the following issue. TypeError: window.Formeo is not a constructor
FormeoEditor.componentDidMount src/App.js:24
21 | }; 22 | 23 | // new Formeo({ container: '.build-form' }); 24 | new window.Formeo(options); 25 | } 26 | 27 | render() {
Hi!
Do you have tutorial for adding custom fields?
Is it possible to add like input types like (email,password etc) ?