Fórum
formbuilder editor, attr acceptChildren (alloy 1.5).
Fernando Nubla Durango, modificado 10 Anos atrás.
formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Postagens: 22 Data de Entrada: 01/09/09 Postagens Recentes
hi!
i have an issue with the formbuilder editor (alloy 1.5).
i´m trying to disable the attribute acceptChildren of a text field but it´s not working the formbuilder always enable me to drop a children field...
the same issue with the textarea type.
i have an issue with the formbuilder editor (alloy 1.5).
i´m trying to disable the attribute acceptChildren of a text field but it´s not working the formbuilder always enable me to drop a children field...
the same issue with the textarea type.
<script>
AUI().use(
'aui-form-builder',
function(A) {
window.myFormBuilder= new A.FormBuilder(
{
availableFields: [
{
iconClass: 'aui-form-builder-field-icon-text',
// id: 'uniqueTextField',
label: 'Text',
type: 'text',
width: 75,
acceptChildren: false,
hiddenAttributes: ['showLabel','readOnly','name'],
},
{
iconClass: 'aui-form-builder-field-icon-textarea',
label: 'Rich-Editor',
type: 'textarea',
acceptChildren:false,
hiddenAttributes: ['showLabel','readOnly','name'],
}
],
boundingBox: '#myFormBuilder',
fields: <%=structureJson%> ,
}
).render();
}
);</code></pre></script>
Andrew Novitzki, modificado 10 Anos atrás.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Mensagem: 1 Data de Entrada: 24/09/13 Postagens Recentes
Ive got almost the same problem, anybody knows the solution?
Fernando Nubla Durango, modificado 10 Anos atrás.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Postagens: 22 Data de Entrada: 01/09/09 Postagens Recentes
I think it´s not implemented...
I´ve the same problem with the enableEditing:false,
I´ve the same problem with the enableEditing:false,
window.myFormBuilder= new A.FormBuilder(
{ enableEditing:false,
availableFields: [
{ ..............
.......
Aravinth Kumar, modificado 8 Anos atrás.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
Regular Member Postagens: 152 Data de Entrada: 26/06/13 Postagens Recentes
Is it working in latest versions?
I m facing the same issue.
Thanks in Advance.
Regards,
Aravinth
I m facing the same issue.
Thanks in Advance.
Regards,
Aravinth
Guilherme Cabrini da Siilva, modificado 7 Anos atrás.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Mensagem: 1 Data de Entrada: 11/04/16 Postagens Recentes
One way to solve this in Alloy version 3.11.0 was overwriting the FormBuilderField.ATTRS.acceptChildren attribute.
Like this:
Now just load the module 'custom-form-builder-field' to disable acceptChildren for all fields.
I don't know if this is the best way to solve but it worked.
Like this:
YUI.add('custom-form-builder-field', function (Y) {
function CustomFormBuilderField() {
this.disableAcceptChildren();
}
CustomFormBuilderField.prototype.disableAcceptChildren = function() {
Y.FormBuilderField.ATTRS.acceptChildren.value = false;
}
return new CustomFormBuilderField();
}, '0.0.1', {
requires: [
'aui-form-builder-field'
]
});
Now just load the module 'custom-form-builder-field' to disable acceptChildren for all fields.
I don't know if this is the best way to solve but it worked.