Please describe the entire sequence. *When* does a field disappear? When you activate the #ahah-enabled element? That means you're most of the way there, but you've put #prefix/suffix around both forms somehow and are not returning a reasonable bit of markup.<br>
<br>Please make sure you dsm() or debug your form after altering to see what you've actually got.<br><br>Are you using the base code provided by the AHAH Example in the Examples project? <br><br>Thanks,<br>-Randy<br><br>
<div class="gmail_quote">On Wed, Dec 29, 2010 at 6:21 PM, <span dir="ltr"><<a 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;">
<div style="direction: ltr;" text="#000000" bgcolor="#ffffff">
I have a form as a result of content profile. I want to add an #AHAH
attribute to one of the fields, and #PREFIX/#SUFFIX to another to
receive the ajax return, in hook_form_alter. When I do that
($form[myfield][#prefix]=) both fields disappear.
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">My head is swimming
looking at all the posts on this and the various hacks to solve
it. I've read discussions of using pre-render, after-build,
drupal_add_js to manually inject the ahah...is there a clean way
to do this?</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">Jeff<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<div>-- <br>
<p style="margin-bottom: 0in;"><img src="https://mail.google.com/mail/?ui=2&ik=584c5da64d&view=att&th=12d34ddf27cbf62a&attid=0.1.1&disp=emb&zw" name="ayenlogo" valign="top" vspace="30" align="LEFT" border="0">
<font style="font-size: 8pt;" size="1">Ayen Designs </font><font face="Times New Roman, serif"><font style="font-size: 8pt;" size="1">
<br>
388 Bullsboro Drive #105 · Newnan, Georgia 30263</font></font>
<br>
<font face="Times New Roman, serif"><font style="font-size: 8pt;" size="1">
404-271-9734<br>
Web:<a href="http://ayendesigns.com" target="_blank">ayendesigns.com</a><br>
Blog: <a href="http://theaccidentalcoder.com" target="_blank">theAccidentalCoder.com</a><br>
Drupal: <a href="http://drupal.org/user/367108" target="_blank">j. ayen
green</a><br>
IRQ: j_ayen_green<br>
IM (Yahoo) baalwww (MSN) <a href="mailto:baalwww@yahoo.com" target="_blank">baalwww@yahoo.com</a><br>
Skype: ayendesigns
<br>
<br>
Ayen Designs is a tradename of the computer services
division of <img src="https://mail.google.com/mail/?ui=2&ik=584c5da64d&view=att&th=12d34ddf27cbf62a&attid=0.1.2&disp=emb&zw" name="acmelogo" align="absmiddle"></font></font></p>
</div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>