angular - 如何隐藏 FormIO 中的警报危险?
问题描述
我在 Angular 7 中使用 FormIO,如果它无效,我不想在我的表单中显示包含“Societe est obligatoire”的警报危险(第一个)。
这是我在 form-io.component.ts 中声明的表单
form= {
components: [
{
type: "textfield",
input: true,
tableView: true,
inputType: "text",
inputMask: "",
label: "Societe",
key: "societe",
placeholder: "societe",
multiple: false,
defaultValue: "",
protected: false,
unique: false,
persistent: true,
validate: {
required: true,
minLength: 1,
pattern: "",
custom: "",
customPrivate: false
},
conditional: {
show: "",
when: null,
eq: ""
}
},
{
input:true,
label:"Validate",
tableView:false,
key:"ValidateFournisseur",
size:"md",
block:false,
action:"submit",
disableOnInvalid:true,
theme:"primary",
type:"button",
hidden:false
}
这是我的 form-io.component.html
<formio [form]="form"></formio>
有什么帮助吗?
解决方案
对于那些仍在寻找答案的人
在你的 html
<formio [form]="form" [options]="options" ></formio>
在你的 ts 文件中
options: Object = {
submitMessage: "",
disableAlerts: true,
noAlerts: true
}
希望能帮助到你
推荐阅读
- ios - 带有动态页脚的 UIScrollView
- python - 如何在条件中使用列的滞后值填充 Pandas 中的另一列
- swift - 选择随机函数的聪明方法
- c# - 正则表达式替换以匿名化名称
- javascript - 从html获取高度并插入状态
- git - 使用 Gogs 和 Drone 构建 CI/CD 平台时,管道出现“无法解析主机”
- cookies - 记住我 cookie cakephp 4 在注销后无法正常工作
- web-scraping - 我用scrapy得到403,它可以在浏览器和wget中完美运行
- python - 熊猫将一些列值转换为行
- node.js - 如何使用 NodeJs 监听和订阅 HTTP 事件?