<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
hi,<br>
I'm trying to do a little pop-up form linked to a download button to
have a visitor register before downloading a document.<br>
This is part of a D7 upgrade of the site, and i was using the popups
module before.<br>
<br>
Now I'm using the popup module, which works fine. But i can't get
the submit handler to work via ajax. I know it's supposed to be
really easy and in core now, but i'm wondering what i'm missing. I
get a full post and page refresh every time i hit the button.<br>
<br>
Here's what i've got on the login form. I show both forms, though
they're actually separate. I'm guessing i'm just sleepy enough i'm
missing something simple.<br>
<br>
The form validate just looks up the email in a table and sees if
they're already registered. If they are, the link to the pdf is
added to the download button.<br>
<br>
<br>
function myform(){<br>
<div class="moz-signature"> $form['guest_email'] = array(<br>
'#type' => 'textfield',<br>
'#default_value' => t('Email Address'),<br>
'#size' => 60,<br>
'#maxlength' => 60,<br>
'#attributes' => array('class' => 'defaultText',
'onClick' => "SelectAll('edit-guest-email');"),<br>
'#required' => TRUE,<br>
);<br>
$form['submit'] = array(<br>
'#type' => 'submit',<br>
'#value' => t('Download'),<br>
'#ajax' => array(<br>
'callback' => 'custom_login',<br>
'wrapper' => 'inner',<br>
'method' => 'replace',<br>
'effect' => 'fade',<br>
),<br>
);<br>
return $form;<br>
}<br>
<br>
Thanks.<br>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<title></title>
-Don Pickerel-<br>
Fane Software<br>
<img alt="" src="cid:part1.05080103.04050608@fane.com"
height="70" width="66"><br>
</div>
</div>
</body>
</html>