Vue-form-generator: fieldUpload not setting id attribute correctly

Created on 7 Mar 2018  路  7Comments  路  Source: vue-generators/vue-form-generator

Setting the id property in the schema for field type: "upload" results in markup that looks like:

<input id="getFieldID(schema)" 
     type="file"
     accept=".jpg,.jpeg,.png,.pdf" 
     required="required" class="form-control">

Comparing it to other core field files, it looks like in fieldUpload.vue the id prop is missing a colon, here.

Could be an easy/quick fix :)

bug easy

All 7 comments

@jewbetcha this PR should solve the problem - thanks.

Thanks for the quick reply :)

@zoul0813 any estimate on a release date for this fix?

@jewbetcha you can use it now, just have npm reference the github repo's master branch instead of the npm package.

I believe @icebob will be releasing a new version to npmjs soon though.

In case you need it, here's how I reference VFG in my project:

  "devDependencies": {
    ... snipped
    "vue-form-generator": "git+https://github.com/zoul0813/vue-form-generator.git#develop",
  }

You would likely want to use git+https://github.com/vue-generators/vue-form-generator.git#master

Doing this, will allow you to keep up to date with the latest changes in the master branch and not wait for an npm package update ... I'd recommend only doing this during development, and to lock your production code to a specific npmjs release (or git tag/commit).

Okay great. Thank you!

I tried this, but ran into a multitude of babel/webpack errors. My project is on @babel 7.x and it looks like that and the associated plugins aren't cooperating with VFG from git. Hopefully @icebob will want to release soon :+1:

Released in v2.2.1

@icebob awesome!

Was this page helpful?
0 / 5 - 0 ratings