我的项目使用dvajs(基于redux和redux-saga),下面的代码是在单击按钮后发送请求,通过连接更改状态,然后调用ant design组件message.error amessage.success(类似于警告)来提醒您。
import type { Dispatch } from 'umi';
import ProForm, { ProFormText } from '@ant-design/pro-form';
import { message } from 'antd';
const tip = (type: string, c
我的form_alter中有一个自定义按钮,并为此提供了一个提交处理程序。I don't need validation用于此按钮提交。我试图通过给出limit_validation_errors来排除定制提交的所有验证。在提交处理程序中,当这样给予时,是not receiving any form values。对如何解决这个问题有什么想法吗?
尝试
function mymodule_form_alter(&$form, FormStateInterface $form_state, $form_id){
//Additional button for the Save
目前,如果使用欧芹,当我们单击submit按钮时,它将自动验证。
我想做的是
当用户提交按钮时,使用jQuery处理
取决于字段值,例如状态是草案,不要触发欧芹验证。
如果状态发布,则触发欧芹验证。
问题是,当我单击submit按钮以实现上述场景时,如何防止欧芹自动验证?
$(".review_form").submit(function (event) {
// get status value
var status = $("#status").val();
// continue the form submi
我的MVC应用程序中有很多页面,用户点击提交按钮来发布表单。有时用户会单击Submit,因为没有立即发生,所以再次单击它。因此,该表单提交两次。为了防止这种情况,我有以下JavaScript代码:
// When the user submits the form, disable the Save button so there is no chance
// the form can get double posted.
$('#form').submit(function () {
$(this).find('input[type=submit]'