我有“创建用户”表单,需要一点帮助。在我希望用户单击按钮的链接之一,然后会弹出带有信息的小弹出窗口,然后他们关闭弹出窗口并继续填写表格。以下是代码:
<div class="users form">
<?php
echo $this->Form->create('User', array (
'type' => 'post',
'inputDefaults' => array (
'div' => false
)
)
);
?>
<script>
$(document).ready(function() {
$('#UserFirstName').focus();
});
</script>
<fieldset>
<legend></legend>
<h2>Registration</h2>
<?php
echo $this->Form->input('firstName');
echo '<div class=\'clear\'></div>';
echo $this->Form->input('lastName');
echo '<div class=\'clear\'></div>';
echo $this->Form->input('username');
echo '<div class=\'clear\'></div>';
echo $this->Form->input('password', array ('class' => 'short'));
echo '<div class=\'clear\'></div>';
echo $this->Form->input('password_confirm', array('type' => 'password', 'label' => 'Confirm Password: ', 'class' => 'short'));
echo '<div class=\'clear\'></div>';
echo $this->Form->input('email', array('label' => 'Email: ', 'default' => $email));
echo '<div class=\'clear\'></div>';
echo $this->Form->input('id', array('label' => 'id: ', 'type' => 'hidden', 'default' => 37));
$qmark = $this->Html->image('qmark.png', array('height' => 15));
echo '<div class=\'clear\'></div>';
echo $this->Form->input('number', array('label' => 'Number:', 'class' => 'short', 'after' => $qmark));
echo '<div class=\'clear\'></div>';
?>
我希望用户单击 qmark 按钮,然后会弹出带有该字段定义的小窗口。
echo $this->Form->input('number', array('label' => 'Number:', 'class' => 'short', 'after' => $qmark));
在此先感谢您的帮助。