<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you. Using hook_form_alter and weighting the agenda module
higher than the event module resolves the problem.<br>
<br>
-ron<br>
<br>
Gerhard Killesreiter wrote:<br>
<blockquote cite="mid475675F5.2040107@killesreiter.de" type="cite">
<pre wrap="">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ron Parker schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">I've posted this in Forums, but doesn't look like I'm going to get a
response, and I'm pretty sure someone here knows this right off the bat.
I'm creating an agenda module for 5.x. So far, it only requires the
event module. The module creates a new content type: "agenda". It is
set to appear in all calendars (for now) so has event start and end date
fields associated with it.
<>To use it, I create an event node, then the module allows me to create
an agenda node that corresponds to the event node. The agenda content
type has start/end date fields. I do not have jscalendar.module
installed. I wish to pass the start and end dates of the corresponding
event node to the agenda node automatically.
I'm currently trying to use the following code in hook_form, which I
modified from the event_form_alter() function:
$event = node_load($node->event_id); // Load corresponding event node
if (arg(1) == 'add' || arg(1) == 'ognodeadd') {
$form['event_start'] = array(
'#type' => 'fieldset',
'#title' => t('Start date'),
'#weight' => -15
);
$form['event_start']['date'] = event_form_date($event->event_start,
'start', $event->start_offset);
}
But, nothing is coming through.
</pre>
</blockquote>
<pre wrap=""><!---->
That's probably because event.module replaces your form stuff by its own
in event_form_alter. What you need to do is to implement your own
hook_form_alter and alter the stuff event put in, specifically th
default values. For this to work you need to make sure your module has a
higher weight in the system table than event.module.
Cheers,
        Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHVnX1fg6TFvELooQRArChAKCPicYkqkEBjkWDudkWcoE3KmHaWQCgs+is
EILJBCvRN/5xZ03Uqs7qYBo=
=K9AD
-----END PGP SIGNATURE-----
__________ NOD32 2703 (20071205) Information __________
This message was checked by NOD32 antivirus system.
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ron Parker
Software Creations <a class="moz-txt-link-freetext" href="http://www.scbbs.com">http://www.scbbs.com</a>
Self-Administration Web Site <a class="moz-txt-link-freetext" href="http://saw.scbbs.com">http://saw.scbbs.com</a>
SDSS Subscription Mgmt Service <a class="moz-txt-link-freetext" href="http://sdss.scbbs.com">http://sdss.scbbs.com</a>
Central Ave Dance Ensemble <a class="moz-txt-link-freetext" href="http://www.centralavedance.com">http://www.centralavedance.com</a>
R & B Salsa <a class="moz-txt-link-freetext" href="http://www.randbsalsa.com">http://www.randbsalsa.com</a>
</pre>
</body>
</html>