GrapesJS / components-forms

Set of form components and blocks for the GrapesJS editor
BSD 3-Clause "New" or "Revised" License
70 stars 58 forks source link

How do you add an option element as a child to a select element? #1

Closed rjcorwin closed 6 years ago

rjcorwin commented 6 years ago

Hi there - It's great to form plugins for grapejs! I'm wondering if there is a way to add option elements to select lists. I'm able to create the select element but I haven't figured out where the configuration for options goes.

artf commented 6 years ago

Hi @rjsteinert you should see the option configuration in 'Settings' (once the select component is selected)

rjcorwin commented 6 years ago

@artf Thanks for the reply. Perhaps the demo is running on some older code where the select component has a bug? I'm not seeing settings when a select component is selected. screen shot 2017-11-02 at 12 45 04 pm

artf commented 6 years ago

@rjsteinert definitely a bug, thanks for the catch

afotey commented 6 years ago

Is there a way to add form elements by themselves?

When I try to add a textarea, for example, to a completely blank canvas, nothing happens.

This is the same experience as in the demo. When a user removes everything, it's not possible to add a form element. You can drag and drop, but nothing happens.

artf commented 6 years ago

@afotey Are acting like this just by design https://github.com/artf/grapesjs-plugin-forms/blob/master/src/components.js#L191 You have to create the form and then dragging inside form elements