I have a theme “basic_theme”. I want to add some settings to this theme, in particular config menu_search_fields is a sequence of data, each entry has 3 informations (field, weight and uuid).
I’m pretty sure the schema is correct because I almost copied from
basic_theme.settings: type: theme_settings label: Basic theme settings mapping: menu_search_fields: type: sequence label: Menu search fields sequence: type: mapping mapping: field: type: string weight: type: float uuid: type: string
Inside theme-settings.php I have some fields to map to those data, for example field “field” is:
$i = 0; // for this example only one entry $form('menu_search')('fields')('wrapper')($i)('field-wrapper')( "menu_search_fields.$i.field" ) = ( '#type' => 'textfield', '#title' => t('Field'), '#default_value' => theme_get_setting( "menu_search_fields.$i.field" ), );
I used as a key “menu_search_fields.$i.field” but i doesn’t work.
How can I correctly map the fields with sequence entries?