optimajet / formbuilder

FormBuilder - Lightweight, React-based, Drag&Drop, Customizable
https://formbuilder.dev
92 stars 35 forks source link

Remove Component #31

Open sprajapatiDev opened 9 months ago

sprajapatiDev commented 9 months ago

How can we remove(customize component) like if we don't want collectons component or TreePicker img1

sergeythrees commented 9 months ago

@sprajapatiDev How can we remove(customize component) like if we don't want collectons component or TreePicker img1

Hello, you can edit the list of components using the FormBuilder ref:

<DWKitFormBuilder
        ref={(builder) => {
            formbuilder = builder;
            const controls = formbuilder.dwKitControls;
            const controlsForHide = ['treepicker', 'dropzone']
            controls.items = controls.items.filter(({key}) => !controlsForHide.includes(key))
            //FOR EDIT
            const buttonControl = controls.items.find(({key}) => key === 'button')
            buttonControl.key = 'MyButton'
            buttonControl.title = 'MyButton'
            console.log(buttonControl)
        }}
...

add this code here: https://github.com/optimajet/formbuilder/blob/master/demo/formbuilderdev-builder.js

sprajapatiDev commented 9 months ago

Hi @sergeythrees , Thanks for solution . I have one query also If I sign on signature component after click on upload button it will disappear. Below I provide a screenshot. Screenshot 2023-09-11 173728 Screenshot 2023-09-11 173746

sergeythrees commented 9 months ago

Hi @sergeythrees ,

Thanks for solution .

I have one query also If I sign on signature component after click on upload button it will disappear. Below I provide a screenshot.

Screenshot 2023-09-11 173728

Screenshot 2023-09-11 173746

Thanks for noticing the bug. We will fix it soon.

sprajapatiDev commented 9 months ago

sure

sprajapatiDev commented 9 months ago

Hi @sergeythrees ,

can we remove the highlighted part after we click on save button and show only form hgh

sergeythrees commented 9 months ago

Hi @sergeythrees ,

can we remove the highlighted part after we click on save button and show only form hgh

Yes, https://formbuilder.dev/documentation/form