Forums de discussion
formbuilder editor, attr acceptChildren (alloy 1.5).
Fernando Nubla Durango, modifié il y a 10 années.
formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Publications: 22 Date d'inscription: 01/09/09 Publications récentes
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, modifié il y a 10 années.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Envoyer: 1 Date d'inscription: 24/09/13 Publications récentes
Ive got almost the same problem, anybody knows the solution?
Fernando Nubla Durango, modifié il y a 10 années.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Publications: 22 Date d'inscription: 01/09/09 Publications récentes
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, modifié il y a 8 années.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
Regular Member Publications: 152 Date d'inscription: 26/06/13 Publications récentes
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, modifié il y a 7 années.
RE: formbuilder editor, attr acceptChildren (alloy 1.5).
New Member Envoyer: 1 Date d'inscription: 11/04/16 Publications récentes
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.