php - 如何根据复选框限制选择框选项?
问题描述
我目前正在开发可以选择业务或专业角色的注册表单。我想将专业角色的选项限制为只能选择“交付”选项。我怎样才能做到这一点 ?
截图
这是我的网站网址如果它可以提供帮助。https://www.behealthy.asia/cp/
谢谢你
<div class="tab-pane fade in" id="company">
<form action="#" method="post" class="do-registration-form">
<div class="form-group">
<div class="tg-registeras">
<span><?php esc_html_e('Register As', 'listingo_core'); ?>:</span>
<div class="tg-radio">
<input type="radio" class="register_type" value="business" id="business" name="register[type]" checked>
<label for="business"><?php esc_html_e('Business', 'listingo_core'); ?></label>
</div>
<div class="tg-radio">
<input type="radio" class="register_type" value="professional" id="professional" name="register[type]">
<label for="professional"><?php esc_html_e('professional', 'listingo_core'); ?></label>
</div>
</div>
</div>
<div class="form-group">
<span class="tg-select">
<select name="register[category]" class="sp-category">
<option value=""><?php esc_html_e('Select Category', 'listingo_core'); ?></option>
<?php listingo_get_categories('', 'sp_categories'); ?>
</select>
</span>
</div>
<?php if( apply_filters('listingo_dev_manage_fields','true','sub_category') === 'true' ){?>
<div class="form-group">
<span class="tg-select">
<select name="register[sub_category][]" data-placeholder="<?php esc_html_e('Sub category', 'listingo'); ?>" multiple class="sp-sub-category sp-register-ms">
<option value=""><?php esc_html_e('Select Sub Category', 'listingo_core'); ?></option>
</select>
</span>
解决方案
推荐阅读
- angular - 使 igx-grid 的第一行不可编辑
- java - 使用反射或其他方法来分析测试
- parsing - 使用 Ansible 在结构化文件中查找值
- maven - Maven 版本插件跳过了一些依赖项
- r - 使用 perm.t.test 的多对排列 t 检验
- python-3.x - 在google colab或kaggle notebook环境中安装pywin32包
- node.js - 无法使用 ClusterIP 服务与 postgres 建立连接
- excel - VBA如果单元格中的值在其他单元格中显示字符串
- angular - 如何在依赖于另一个组件的主导航组件(即持有路由器出口)的角度组件中加载患者列表
- apache-spark - 如何在 EMR 中为任务节点添加自定义节点标签