<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>I've continued to dig into altering forms and I'm
getting somewhere, just need a few tips from those who have already done it
before</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I now have the following in my theme's
template.php</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">// Open the file attachments collapsible
block in a full state<BR>function phptemplate_node_form($form)
{<BR>$form['attachments']['#collapsed'] = FALSE;<BR>$form['buttons']['#weight']
= 100;<BR>return drupal_render($form);<BR>}</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>and the submit/preview buttons have returned to
where they are supposed to be at the bottom of the page. Two
questions:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>1. how can I make this only effect "report" node
types. I tried "function phptemplate_report_node_form" and got a parse
error.</FONT></DIV>
<DIV><FONT size=2 face=Arial>2. why did I need to add the line about buttons?
why did adding the single line to open the attachments form then seemingly reset
the weight of the buttons? I'm using zen theme by the way.</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=neil@esl-lounge.com href="mailto:neil@esl-lounge.com">Neil
Coghlan</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=support@drupal.org
href="mailto:support@drupal.org">support@drupal.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, May 23, 2010 6:01 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [support] trying to get the
attachments div to be permanentlyopen</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>Just had a look and actually, the submit/preview
buttons have moved halfway up the page, above the attachments div and above a
couple of other cck fields.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>the only code I added was that pasted in my
previous mail.</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=neil@esl-lounge.com href="mailto:neil@esl-lounge.com">Neil
Coghlan</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=support@drupal.org
href="mailto:support@drupal.org">support@drupal.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, May 23, 2010 5:54
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [support] trying to get the
attachments div to be permanently open</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>I was looking through the thread here: <A
href="http://drupal.org/node/227339">http://drupal.org/node/227339</A></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>the problem I'm having is that when I add this
to my theme's template.php:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">// Open the file attachments
collapsible block in a full state<BR>function phptemplate_node_form($form)
{</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">$form['attachments']['#collapsed'] =
FALSE;<BR>return drupal_render($form);<BR>}</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>the attachments div is open BUT the main submit
and preview buttons disappear. Any reason why that function should be
interfering with the node form's submit and preview buttons?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Neil</FONT></DIV>
<P>
<HR>
<P></P>-- <BR>[ Drupal support list | http://lists.drupal.org/ ]</BLOCKQUOTE>
<P>
<HR>
<P></P>-- <BR>[ Drupal support list | http://lists.drupal.org/
]</BLOCKQUOTE></BODY></HTML>