<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Eric<br>
<br>
For the variable name you only want to use the element name, so
for<br>
<pre>        ['scheduler']['publish']['touch']</pre>
you would use 'touch', so the call to variable_get would be<br>
<pre>        variable_get('touch_'.$form['#node_type']->type, 0)</pre>
I tend to make my names more self contained so instead of
'touch'<br>
I would use something like "publish_touch" to the element
and variable name.<br>
<br>
Nevets<br>
<br>
On 10/6/2010 2:02 PM, Eric Schaefer wrote:
<blockquote
cite="mid:AANLkTi=4HZHQ12_dBMAv4zNi4Ci9z+iHcd-v=eRb2hhX@mail.gmail.com"
type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 13px;"
lang="x-western">
<pre wrap="">2010/10/6 Steve Ringwood <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:nevets@tds.net"><nevets@tds.net></a>:
</pre>
<blockquote type="cite" style="color: rgb(0, 0, 0);">
<pre wrap=""><span class="moz-txt-citetags">> </span> The 'scheduler' comes from the form element name
<span class="moz-txt-citetags">> </span>($form['workflow']['scheduler'])
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span> You can add new elements to existing field sets or add your own field
<span class="moz-txt-citetags">> </span>set.
</pre>
</blockquote>
<pre wrap="">Thats what I guessed. Thats why I tried this:
$form['scheduler'] = array(
'#type' => 'fieldset',
'#title' => 'Scheduler settings',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 35,
'#group' => 'additional_settings',
);
$form['scheduler']['publish'] = array(
'#type' => 'fieldset',
'#title' => 'Publishing settings',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 1,
'#group' => 'additional_settings',
);
$form['scheduler']['publish']['enable'] = array(
'#type' => 'checkbox',
'#title' => t('Enable scheduled publishing'),
'#default_value' => variable_get('scheduler_publish_enable_'.
$form['#node_type']->type, 0),
'#description' => t('Check this box to enable scheduled
publishing for this node type.')
);
$form['scheduler']['publish']['touch'] = array(
'#type' => 'checkbox',
'#title' => t('Alter published on time'),
'#default_value' => variable_get('scheduler_publish_touch_'.
$form['#node_type']->type, 0),
'#description' => t('Check this box to alter the published on
time to match the scheduled time ("touch feature").')
);
There is supposed to be a "scheduler" fieldset and a "publish"
fieldset inside it. Inside the latter are two checkboxes. The form
gets created alright but the variables don't get set. What am I doing
wrong?
Thanks,
Eric
</pre>
</div>
</blockquote>
<br>
</body>
</html>