Foros de discusión
formbuilder editor, attr acceptChildren (alloy 1.5).
Fernando Nubla Durango, modificado hace 10 años.
formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Mensajes: 22 Fecha de incorporación: 1/09/09 Mensajes recientes
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 hace 10 años.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Mensaje: 1 Fecha de incorporación: 24/09/13 Mensajes recientes
Ive got almost the same problem, anybody knows the solution?
Fernando Nubla Durango, modificado hace 10 años.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Mensajes: 22 Fecha de incorporación: 1/09/09 Mensajes recientes
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 hace 8 años.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
Regular Member Mensajes: 152 Fecha de incorporación: 26/06/13 Mensajes recientes
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 hace 7 años.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Mensaje: 1 Fecha de incorporación: 11/04/16 Mensajes recientes
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.