lukemadera / meteor-autoform-googleplace

Google Places Autocomplete input (without map). Returns an object with formatted address components
21 stars 19 forks source link

bootstrap class "form-control" not added for input #18

Open veyronfei opened 8 years ago

veyronfei commented 8 years ago

First, I would like to thank you so much for providing this awesome packages, it saves me a lot of time. However I noticed maybe a small bug for the class.

I am using template bootstrap3-horizontal for my autoform. When I add {{> afQuickField name="address" type="googleplace" opts=optsGoogleplace template="bootstrap3-horizontal" label-class="col-sm-2" input-col-class="col-sm-8"}} to my html file, it's redered as without the class "form-control".

This is causing inconsistent layout with the rest of autoform fields.

knoid commented 8 years ago

I'm adding it with the following code, note the autocomplete: off so the browser doesn't show the built-in suggestions.

const schema = new SimpleSchema({
  near: {
    type: new SimpleSchema({
      fullAddress: { type: String },
      geometry: { type: GeoJSONPoint } // a SimpleSchema I defined before
    }),
    autoform: {
      type: 'googleplace',
      afFieldInput: {
        'class': 'form-control',
        autocomplete: 'off'
      }
    }
  }
});

Hope it helps.