Info |
---|
This page demonstrates how to use REST API#Getformdefinition to show form definition / configuration details |
We have a form configured on this page
Image Added
ConfiForms Form Definition |
---|
|
tttext ddfalse[1=one|2=two|3=three|]select INLINE |
...
Form Configuration
Info |
---|
Dynamically looked up from the form via REST API |
HTML |
---|
<script type="application/javascript">
AJS.toInit(function() {
var isPageEdit = AJS.$('#content').hasClass('page edit');
if (!isPageEdit) {
var url = 'https://wiki.vertuna.com |
...
/ajax/confiforms/rest/definition.action?pageId= |
...
60228753&f=f';
var xhr = AJS.$.ajax({
url: url,
timeout: 10000, // 10 sec
success: function (data) {
AJS.$('#codeBlock').find('pre').html(JSON.stringify(data, null, 4));
},
error: function (jqXHR, textStatus, errorThrown) {
console.log('request to get data from ConfiForms has failed... ' + textStatus);
}
});
}
});
</script>
|
Editor
Image Added
The code
Code Blockhtml |
---|
<script type="application/javascript">
AJS.toInit(function() {
var isPageEdit = AJS.$('#content').hasClass('page edit');
if (!isPageEdit) {
var url = 'https://wiki.vertuna.com/ajax/confiforms/rest/definition.action?pageId=60228753&f=f';
var xhr = AJS.$.ajax({
url: url,
timeout: 10000, // 10 sec
success: function (data) {
AJS.$('#codeBlock').find('.containerpre').html(JSON.stringify(data, null, 4));
},
error: function (jqXHR, textStatus, errorThrown) {
console.log('request to get data from ConfiForms has failed... ' + textStatus);
}
});
}
});
</script>
|