sethsandaru / vue-form-builder

Super Form Builder built on top of Vue with Drag & Drop functionality, savable-form-schema and easy to maintain/upgrade your form.
http://vue-form-builder.sethphat.com
MIT License
414 stars 129 forks source link

Render without form elements #83

Closed sadortun closed 3 years ago

sadortun commented 3 years ago

Hi @sethsandaru

/cc @abhimanusharma

I really like your project !

In a similar fashion as #67 that propose a read-only mode, how would you feel about having a "not-a-form" mode ? ( aka: just render the structure, without the form elements)

I would like to be able to render the same page either as:

Would you be interested in a PR?

Have a nice day, Samuel

sethsandaru commented 3 years ago

Hey @sadortun ,

As far as I can understand, you want to have a form but not render the form elements like this:

Do I get it right?

sadortun commented 3 years ago

@sethsandaru yep, exactly.

The idea is to have the rendered form have the same layout as the non-editable data.

Since my original post, I did think a way to do this without having to re-write everything and I ended up creating a custom control that allow me to toggle normal/editable modes.

It solves the issue quite nicely

sethsandaru commented 3 years ago

@sadortun I think it's actually a good feature that we should have. And yes, custom controls work well for that too.

I think it would be good if we have an option like <FormRenderer :read-only="true|false" .../>

Will add this one to the backlog. Thanks

sadortun commented 3 years ago

@sethsandaru I would recommend using another name than read only since it refer to actual fields be disabled or not.

This feature is more of a way to hide form controls completly.

Maybe :

abhimanusharma commented 3 years ago

I like this Idea, I also had the similar use case but I had to do it manually.