function tw_form_production_node_form_alter(&$form, &$form_state) {
	//see($form);
	$access = user_access('administer nodes');
	$form['path']['#access'] = $access;
	$form['menu']['#access'] = $access;
	$form['author']['#access'] = $access;
	//$form['options']['#access'] = $access;
	$form['comment_settings']['#access'] = $access;
	$form['revision_information']['#access'] = $access;
	$form['field_helen_hayes_recommended']['#access'] = $access;

	$form['field_show_schedule']['und'][0]['tablefield']['rebuild']['#title'] = "Change number of rows";
	if (isset($form['field_show_schedule']['und'][0]['tablefield']['rebuild']['count_cols']))
		$form['field_show_schedule']['und'][0]['tablefield']['rebuild']['count_cols']['#access'] = FALSE;
}

This does not work. Well it works but when users do a "Rebuild" they get a no index 'count_cols' error. ('#disabled' = TRUE also give sthis error) I'm trying to turn off the ability of the data entry person altering the number of cols but still alter the number of rows. Will I have to be satisfied just using a validation and checking the number of columns?

Comments

donpwinston’s picture

Issue summary: View changes

add more complete explanation as to what happens

lolandese’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Have a look at the Table Element module that is intended to provide a provide a form element .

The table element is a "missing" form element supporting table rendering via the Form API. It includes table_select and draggable functionality.