【发布时间】:2019-02-11 14:42:47
【问题描述】:
我正在使用cakephp-3.6.14,我有这个表格:
<div class="customers form large-9 medium-8 columns content">
<?= $this->Form->create($customer) ?>
<fieldset>
<legend><?= __('Edit Customer') ?></legend>
<?php
echo $this->Form->control('company');
echo $this->Form->control('name');
echo $this->Form->control('surname');
echo $this->Form->control('tel');
echo $this->Form->control('mob');
echo $this->Form->control('email');
echo $this->Form->control('customer_type_id', ['options' => $customerTypes, 'empty' => true]);
echo $this->Form->control('business_type_id', ['options' => $businessTypes, 'empty' => true]);
echo $this->Form->control('business_name');
echo $this->Form->control('balance');
echo $this->Form->control('birthday', ['empty' => true]);
echo $this->Form->control('notes');
echo $this->Form->control('user_assigned');
echo $this->Form->control('created_by');
echo $this->Form->control('created_date', ['empty' => true]);
echo $this->Form->control('modified_by');
echo $this->Form->control('modified_date', ['empty' => true]);
echo $this->Form->control('Address');
?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?></br></br>
是否可以显示“您确定要离开此页面吗?”之类的确认消息?如果用户已开始填写表单并意外(通过单击菜单项)重定向到另一个页面?
我希望仅当用户至少完成了表单的一个字段时才显示确认消息。这个question没有回答哪个@
【问题讨论】:
-
@Cid 我希望仅当用户至少完成了表单的一个字段时才显示确认消息。您作为重复提供的这个问题中没有回答。
-
没有什么能阻止您检查该函数的输入值
标签: javascript php jquery cakephp cakephp-3.x