首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在FormIO中隐藏警报危险?

如何在FormIO中隐藏警报危险?
EN

Stack Overflow用户
提问于 2019-04-09 23:15:01
回答 1查看 942关注 0票数 1

我使用的是Angular 7中的FormIO,我不想在我的表单中显示包含"Societe est obligatoire“的警告-危险(第一个),如果它无效。

这是我在form-io.component.ts中声明的表单

代码语言:javascript
复制
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 
  } 

这是我的表单-io.Component.html

代码语言:javascript
复制
<formio [form]="form"></formio>

有什么帮助吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-06-06 12:06:50

对于那些仍在寻找答案的人

在您的html中

代码语言:javascript
复制
<formio [form]="form" [options]="options" ></formio>

并在yout ts文件中

代码语言:javascript
复制
options: Object = {
  submitMessage: "",
  disableAlerts: true,
  noAlerts: true
}

希望能有所帮助

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55596073

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档