'#description'=>t('The label for your custom publishing option. This is the text that will be displayed on the node add/edit form.'),
'#maxlength'=>255,
'#required'=>TRUE,
);
];
$form['state_fs']['state_machine']=array(
$form['state_fs']['state_machine']=[
'#type'=>'textfield',
'#title'=>t('Option name'),
'#description'=>t('The machine-readable name of this publishing option. This text will be used for constructing the database table column name. This name must contain only lowercase letters, numbers, and underscores. This name must be unique.'),
'#required'=>TRUE,
);
];
$form['state_fs']['node_types']=array(
$form['state_fs']['node_types']=[
'#type'=>'checkboxes',
'#title'=>t('Available on'),
'#description'=>t('The Node Types this option is available on.'),
form_set_error('state_machine',t("Invalid machine-readable name. That name is already taken by a database column. Please enter a name other than %invalid.",array('%invalid'=>$type['type'])));
form_set_error('state_machine',t("Invalid machine-readable name. That name is already taken by a database column. Please enter a name other than %invalid.",['%invalid'=>$type['type']]));
}
foreach($typesas$check){
if($type['name']==$check['name']){
form_set_error('state',t("Invalid Label. That Publishing Label is already taken. Please enter a label other than %invalid.",array('%invalid'=>$type['name'])));
form_set_error('state',t("Invalid Label. That Publishing Label is already taken. Please enter a label other than %invalid.",['%invalid'=>$type['name']]));
form_set_error('state',t("Invalid Label. The publishing label is already taken. Please enter a label other than %invalid.",array('%invalid'=>$type['name'])));
form_set_error('state',t("Invalid Label. The publishing label is already taken. Please enter a label other than %invalid.",['%invalid'=>$type['name']]));
}
}
}
@@ -243,7 +249,7 @@ function custom_pub_edit_validate($form, &$form_state) {