I'm using a foreach to get membership level information:
foreach ($aMemLevels as $aMemLevel) {
// Add 'mlevels' array to $aForm['inputs'] array
}
I have a main form variable that hold a large array: $aForm
The form is setup like this:
$aForm = array(
'form_attrs' => array(
'name' => 'menu_access',
'action' => BX_DOL_URL_ROOT.'m/memberships/main_menu',
'method' => 'post',
'onsubmit' => 'saveMenuItem(this); return false;'
),
'inputs' => array(
'mlevels' => array(
'type' => 'checkbox',
'caption' => 'Check to enable',
'name' => '1',
'value' => '1',
),
),
);
I am trying to find a way to add an "mlevels" array to the
$aForm['inputs']
array, for each iteration of $aMemLevels.