已禁用的字段在自定义列表表单中保存为空白 [英] Disabled fields are saved as blank on custom list form

查看:97
本文介绍了已禁用的字段在自定义列表表单中保存为空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我们已经创建了一个自定义编辑表单,我们禁用了document.ready函数中的一些文本框。

We have created a custom edit form where we disabled some of the text boxes in document.ready function.

但是当我们点击"保存"时,所有已禁用的字段都会保留为空白,即使它们有一些值。

But when we click on save, all the disabled fields are saved blank, even though they have some values.

但不是禁用,我们使用readonly,一切顺利。如果在回发期间忽略禁用的字段,为什么问题仅在自定义编辑表单中而不是开箱即用形式。

But instead of disable, we used readonly and all went well. If disabled fields are ignored during post back, why the problem is only in custom edit form and not in out of the box form.

请建议,

Chaitanya。

Chaitanya.

推荐答案

嗨Chaitanya,如果目标是让他们阅读只是,我建议更改你的代码以显示字段的值并隐藏实际控件。

Hi Chaitanya, if the goal is to make them read only, I suggest changing your code to display the value of the field and hiding the actual control.

这样的事情:

var myVar =

var myVar =


(" input [title ='Field Name']")。val();

("input[title='Field Name']").val();


(" input [title ='Field Name']")。parent() .prepend(myVar);

("input[title='Field Name']").parent().prepend(myVar);


这篇关于已禁用的字段在自定义列表表单中保存为空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆