meteor-autoform-googleplace icon indicating copy to clipboard operation
meteor-autoform-googleplace copied to clipboard

bootstrap class "form-control" not added for input

Open veyronfei opened this issue 9 years ago • 1 comments

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.

veyronfei avatar Jan 06 '16 03:01 veyronfei

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.

knoid avatar Oct 06 '16 02:10 knoid