在做ecstore一个医药项目时 后台编辑发票信息时 可以根据发票类型切换不同的表单
由于最初表单是用base_component_ui生成出来的 vtype="required" 的时候 同时会有required="1" 属性
当隐藏一个表单的时候 提交表单 会报
:8080/index.php/shopadmin/index.php#app=b2c&ctl=admin_member_invoice&act=index:1 An invalid form control with name='invoice_name' is not focusable.
原因是 input被隐藏掉的话 不能再有required属性(required="1") 否则提交会报An invalid form control with name='invoice_name' is not focusable.
去掉required="1"即可
由于最初表单是用base_component_ui生成出来的 vtype="required" 的时候 同时会有required="1" 属性
当隐藏一个表单的时候 提交表单 会报
:8080/index.php/shopadmin/index.php#app=b2c&ctl=admin_member_invoice&act=index:1 An invalid form control with name='invoice_name' is not focusable.
原因是 input被隐藏掉的话 不能再有required属性(required="1") 否则提交会报An invalid form control with name='invoice_name' is not focusable.
去掉required="1"即可