Hello everyone!
I’m trying to make a form dynamically with a textarea, and I’m unable to get it. I’ve tried it in several ways without success.
In the form’s template, one of the options for “type” is “custom”, but I can’t find any kind of documentation to be referred to with ”
Is there a way to do it with a jqxTextArea?.
thanks for your help!.
function createTopicForm(){
var tplform = [{
bind: 'topic',
type: 'text',
label: 'Topic:',
labelPosition: 'top',
width: '100%',
padding: {left: 5, top: 0, right: 5, bottom: 12}
},{
bind: 'subtopic',
type: 'text',
label: 'Subtopic:',
labelPosition: 'top',
width: '100%',
padding: {left: 5, top: 0, right: 5, bottom: 12}
},{
type: 'custom',
bind: 'description',
label: 'Description:',
labelPosition: 'top',
width: '100%',
component: 'jqxTextArea',
padding: {left: 5, top: 0, right: 5, bottom: 32}
},{
columns: [{
type: 'button',
name: 'cancel',
text: 'Cancel',
width: '90px',
height: '30px',
rowHeight: '40px',
columnWidth: '50%',
align: 'right'
},{
type: 'button',
name: 'submit',
text: 'Search...',
width: '90px',
height: '30px',
rowHeight: '40px',
columnWidth: '50%'
}]
}];
$('#topicform').jqxForm({
template: tplform,
padding: {left: 0, top: 0, right: 0, bottom: 120}
}).on('buttonClick', function(event){
if(event.args.name === 'submit'){
}
else {
}
});
}