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
413 stars 129 forks source link

input value from API in v2.x? #35

Closed thegoatherder closed 4 years ago

thegoatherder commented 4 years ago

In v2.x form builder, if I select a dropdown control type, I can choose Option-Data-List Mode: API

There doesn't seem to be an option for this with a text input control type. Will the config object support this in v2.x?

My use case is to be able to load a value for an <input> from an API. Our users will open forms that may previously have been completed by another user - the form would then be pre-populated with the previous form responses. Some of these will become readonly and some will be editable. For this reason, we need to be able to set the value of any control from an API call.

sethsandaru commented 4 years ago

Hi @thegoatherder ,

If you could check the form out again: https://vue-form-builder.herokuapp.com/ . You can see there are 2 options:

And sure, 100%, for the next thing you described. Simply change your v-model data, and then, done. As same as the version 1.x.x. That's what I/everybody am/are doing at the moment to view the form with the previous data from the server.

Thanks.