I’m creating an extension that on installation, programmatically creates a channel and fields for that channel.
One of the fields I’d like to create is a Grid field to store PDF documents against an entry. But reading through ExpressionEngine’s documentation on the channel fields API there’s no mention of Grid, and I can’t find anywhere that specifies the options for creating a Grid field.
What options do I need to specify? So far I have this:
array(
'field_name' => 'floor_plans',
'field_label' => 'Floor Plans',
'field_type' => 'grid',
'field_order' => 30,
'field_instructions' => 'The floor plans for the property',
'field_required' => 'n',
'field_search' => 'n',
'field_is_hidden' => 'n',
),
This creates the Grid field, but there are no inputs to enter data.