how to set editor-field required attribute and html5 support(types such as email,tel,num)

how to set editor-field required attribute and html5 support(types such as email,tel,num)

zhangxlzhangxl Posts: 1Questions: 1Answers: 0
edited December 2018 in Editor

some one give me examples,
appreciate!

Answers

  • allanallan Posts: 48,918Questions: 1Answers: 7,133 Site admin

    You can use the attr option of the input field type (and most others) to apply an attribute to a field.

    {
      label: "My required input:",
      attr: {
        required: true
      }
    }
    

    That can also be used to set the input type:

    {
      label: "My required input:",
      attr: {
        type: 'email',
        required: true
      }
    }
    

    Allan

Sign In or Register to comment.