<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body style="direction: ltr;" bidimailui-charset-is-forced="true"
bidimailui-detected-decoding-type="latin-charset" text="#000000"
bgcolor="#ffffff">
Hi Adam. Hook_nodeapi was put out to pasture in D7, wasn't it? I'm
at the point of node/add/whatever_type, so hook_node_prepare
applies, but the $node object for it contains only the standard
fields and fields added to the content type, but not fields added to
the content type form. I don't know if I'm explaining it correctly.
I want to be able to add an option to content types that can be used
or not, and then when creating a piece of content, be able to check
whether that content type is supposed to use that option.<br>
<br>
<blockquote
cite="mid:BANLkTino8xkJ=xjpBN=HW0tbvR5wju=GwQ@mail.gmail.com"
type="cite">hook_nodeapi using op load or prepare. Alternatively
you could use my module <a moz-do-not-send="true"
href="http://drupal.org/project/custom_pub">http://drupal.org/project/custom_pub</a>
but it doesn't have a per node_type customization at the moment.
But if nothing else the code will show you how I accomplished it.<br
clear="all">
-----<br>
Adam A. Gregory<br>
Drupal Developer & Consultant<br>
Web: AdamAGregory.com<br>
Twitter: <a moz-do-not-send="true"
href="http://twitter.com/adamgregory" target="_blank">twitter.com/adamgregory</a><br>
skype: aagregory2<br>
Phone: 661.347.6597<br>
<br>
<br>
<div class="gmail_quote">On Tue, Jun 28, 2011 at 6:25 PM, Jeff
Greenberg <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<u></u>
<div style="direction: ltr;" text="#000000" bgcolor="#ffffff">
Still unclear on this...not for lack of searching. If I add
a field to node_type_form with hook_form_alter, how do I
access that field's contents when NOT on the content type
page? For example, if as a result of hook_form_alter my
content type form shows the following:<br>
<br>
<span style="border-collapse: separate; color: rgb(0, 0, 0);
font-family: 'Times New Roman'; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; text-indent: 0px;
text-transform: none; white-space: normal; word-spacing:
0px; font-size: medium;"><span style="color: rgb(51, 51,
51); font-family: 'Lucida Grande','Lucida Sans
Unicode',sans-serif; font-size: 13px; line-height:
20px;"><label style="display: block; font-weight: bold;
margin: 0px; padding: 0px; border-width: 0px;
vertical-align: baseline;">Default options</label>
<div style="margin: 0px; padding: 0px; border-width:
0px; vertical-align: baseline;">
<div style="margin: 0px; padding: 5px 0px;
border-width: 0px; vertical-align: baseline;"><input
name="node_options[status]" value="status"
checked="checked" style="margin: 0px; padding:
0px; border-width: 0px; vertical-align: middle;
font-family: 'Helvetica
Neue',Helvetica,Arial,sans-serif;" type="checkbox"><span> </span><label
style="display: inline; font-weight: normal;
margin: 0px; padding: 0px; border-width: 0px;
vertical-align: baseline; text-transform: none;
font-size: 0.923em;">Published</label></div>
<div style="margin: 0px; padding: 5px 0px;
border-width: 0px; vertical-align: baseline;"><input
name="node_options[promote]" value="promote"
checked="checked" style="margin: 0px; padding:
0px; border-width: 0px; vertical-align: middle;
font-family: 'Helvetica
Neue',Helvetica,Arial,sans-serif;" type="checkbox"><span> </span><label
style="display: inline; font-weight: normal;
margin: 0px; padding: 0px; border-width: 0px;
vertical-align: baseline; text-transform: none;
font-size: 0.923em;">Promoted to front page</label></div>
<div style="margin: 0px; padding: 5px 0px;
border-width: 0px; vertical-align: baseline;"><input
name="node_options[sticky]" value="sticky"
style="margin: 0px; padding: 0px; border-width:
0px; vertical-align: middle; font-family:
'Helvetica Neue',Helvetica,Arial,sans-serif;"
type="checkbox"><span> </span><label
style="display: inline; font-weight: normal;
margin: 0px; padding: 0px; border-width: 0px;
vertical-align: baseline; text-transform: none;
font-size: 0.923em;">Sticky at top of lists</label></div>
<div style="margin: 0px; padding: 5px 0px;
border-width: 0px; vertical-align: baseline;"><input
name="node_options[revision]" value="revision"
style="margin: 0px; padding: 0px; border-width:
0px; vertical-align: middle; font-family:
'Helvetica Neue',Helvetica,Arial,sans-serif;"
type="checkbox"><span> </span><label
style="display: inline; font-weight: normal;
margin: 0px; padding: 0px; border-width: 0px;
vertical-align: baseline; text-transform: none;
font-size: 0.923em;">Create new revision</label></div>
<div style="margin: 0px; padding: 5px 0px;
border-width: 0px; vertical-align: baseline;"><input
name="node_options[widglet]" value="widglet"
checked="checked" style="margin: 0px; padding:
0px; border-width: 0px; vertical-align: middle;
font-family: 'Helvetica
Neue',Helvetica,Arial,sans-serif;" type="checkbox"><span>
My option<br>
<br>
</span></div>
</div>
</span></span>The setting for My options shows up every
time I edit the content type, but how do I access it when
content is being created for that content type? </div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</body>
</html>