[英]Fill alpaca properties with a variable
I need to assemble a form dynamically using Alpaca Forms.我需要使用 Alpaca Forms 动态组装表格。 I have the code below:
我有以下代码:
$("#form").alpaca({
"schema": {
"type":"object",
"properties": {
"email": {
"type":"string",
"title":"E-mail",
"required":true
},
"mensagem": {
"type":"string",
"title":"Mensagem",
"required":true
}
}
}
});
And it needs to be filled in using variables for it to be generic, because the amount of fields that the form will have will always vary.并且需要使用变量来填充它以使其具有通用性,因为表单将具有的字段数量总是会有所不同。 Ex: sometimes in addition to the "email", "mensagem" properties, I will have the "assunto", "remetente", "destinatario" properties
例如:有时除了“email”、“mensagem”属性外,我还会有“assunto”、“remetente”、“destinatario”属性
it would need to look something like this:它需要看起来像这样:
$("#form").alpaca({
"schema" : { schemaVariable }
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.