Autoform gurus: How to customize an embedded array?

Hi guys,

I have an simple schema with an embedded array
and within the autoform I’d like to customize it’s individual fields via a afQuickField.

Right now I am embedding the array with a {{> afArrayField name=‘embeddedArrayData’}} which gives me no option to use afQuickField or wrap individual element with html.

I’d like to do something like:

// PSEUDO CODE ( NOT WORKING )
{{>each arrayField='embeddedArrayData'}}
    {{afQuickfield name='field1'}}
    {{afQuickfield name='field2'}}
{{/each}}

Whats the best way to do this?
Any ideas?

PS
I opened the same topic on github: https://github.com/aldeed/meteor-autoform/issues/1243

1 Like

bumper… anyone got an idea how to do this, maybe @aldeed? :grinning:

what about official example?

http://autoform.meteor.com/update-array-item

I’d actually like to keep the PLUS&MINUS buttons and just customize the layout of the row.
The example just shows how to edit a single element…

well, just copy template for afArrayField and use it, all is in documentation https://github.com/aldeed/meteor-autoform/blob/devel/templates/bootstrap3/components/afArrayField/afArrayField.html

and here is some bonus you maybe seen already :> https://medium.com/@ShockiTV/how-i-tried-bootstrap-with-material-design-and-autoform-on-meteorjs-32333baad85f

@shock: thanks a lot for your support!!

I just settled in a solution that fits my use-case:
Did you know that you can actually do a lot in the schema?

So I basically use the schema to assign bootstrap classes to the formGroup:

    autoform: {
      afFormGroup: {
        'formgroup-class': 'col-md-9',
      }
    }

:smile:

well, after today spent on combining these 2 array manipulating usecases - adding new entry to array and editing existing 1 entry of chosing. Paired with setting also geocoordinates with google map places autocompletion to get address + dragging marker by hand to fine tune location. And also centering map to the point where already existing array item is pointing so u can again correct location by hand.
I kinda know a thing about it :smiley:

… this sounds shocking! :smiley:

@shock: my autoform saga continues: https://github.com/aldeed/meteor-autoform/issues/1251 : :confounded: