Is AlloyUI Form Builder works for liferay 6.0.5. Because our site works on Liferay 6.0.5 and we can't update it with the latest version. I have placed the code mentioned in alloyui.com. I can drag and drop the fields but I can't submit the form. There is a script error in firebug M.loaded[n], I didn't understand what to do.
Suggest something on this. I am using the below code in liferay 6.0.5 jsp pages
<script src="http://cdn.alloyui.com/3.0.0/aui/aui-min.js">
<link href="http://cdn.alloyui.com/3.0.0/aui-css/css/bootstrap.min.css" rel="stylesheet"></link>
<div id="myFormBuilder"></div>
<script>
YUI().use(
'aui-form-builder',
function(Y) {
new Y.FormBuilder(
{
availableFields: [
{
iconClass: 'form-builder-field-icon-text',
id: 'firstName1',
label: 'First Name',
readOnlyAttributes: ['name'],
type: 'text',
//unique: true,
width: 75
},
{
iconClass: 'form-builder-field-icon-text',
id: 'lastName',
label: 'Last Name',
readOnlyAttributes: ['name'],
type: 'text',
//unique: true,
width: 75
},
{
iconClass: 'form-builder-field-icon-text',
id: 'preferredName',
label: 'Preferred Name',
readOnlyAttributes: ['name'],
type: 'text',
//unique: true,
width: 75
},
{
iconClass: 'form-builder-field-icon-text',
id: 'emailAddress',
label: 'Email Address',
readOnlyAttributes: ['name'],
type: 'text',
//unique: true,
width: 75
},
{
iconClass: 'form-builder-field-icon-radio',
label: 'Gender',
options: [
{
label: 'Male',
value: 'male'
},
{
label: 'Female',
value: 'female'
}
],
type: 'radio'
},
{
iconClass: 'form-builder-field-icon-button',
label: 'Button',
type: 'button'
},
],
boundingBox: '#myFormBuilder',
fields: [
{
label: 'City',
options: [
{
label: 'Ney York',
value: 'new york'
},
{
label: 'Chicago',
value: 'chicago'
}
],
predefinedValue: 'chicago',
type: 'select'
},
{
label: 'Colors',
options: [
{
label: 'Red',
value: 'red'
},
{
label: 'Green',
value: 'green'
},
{
label: 'Blue',
value: 'blue'
}
],
type: 'radio'
}
]
}
).render();
}
);
</script>
It is NOT possible to use the
aui-form-builder
in Liferay 6.0.According to the Liferay Integration wiki article, Liferay 6.0 uses AlloyUI 1.0.3. After searching the source in the AlloyUI 1.0.3 tag, it seems like the
aui-form-builder
did not exist in that version. As far as I can tell from the API docs,aui-form-builder
was added in the 2.0.x version.Note: it is not possible to upgrade to a new major version of AlloyUI in Liferay either.