Hi!
I am using the following Vertuna tutorial to create and custom a HTML table using the Confiforms ListView macro but even but trying to replicate precisely the example in the tutorial, I am not able create a cohesive HTML table... headers are created for every single entry, so essentially, 100 tables would be created if I have 100 entries....
@Alex Medved _ConfiForms_ could I please have your precious advise ? I just want to be able to create a plain html table that I could customize extensively.
This is the tutorial that I am referring to:https://wiki.vertuna.com/display/CONFIFORMS/Hacking+ConfiForms+ListView+macro+to+show+the+forms+data+in+Confluence+the+way+you+want
Could you please kindly assist ? this is a major roadblock for my project.
I tried with PlainView and ListView...no luck at all...
Thanks a million,
Cyril
Anything you put inside the ListView or PlainView is rendered for each entry matching your filter.
And just to mention that the tutorial you are referring to works for Confluence up to version 5.9
Current versions of Confluence does not allow you to output "parts" of the table html tags as is shown there... Confluence tries to "fix" that for you and attempts to wrap into tables itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick response but it doesn't answer my question at...Your explanation was naturally observed....
As mentioned, I used the Vertuna tutorials which clearly shows that the table header should be positioned outside the plainview or list view macro, so that's naturally what I tried too...in this scenario the header is simply not attached to the core body...
Anyway, I figured it out, so this is not an issue anymore.
However, would you be able to tell me if formulas such as sum or count are supported in plainview or listview at all ?Such as sum:([entry.field] or Count: ?
Thanks,
Cyril
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, they are not supported (not via ConfiForms Field macros at least). Only in TableViewMerger or using the ValueView macro (which can be used inside the ListView)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your quick answer, much appreciated.
Are there any ways at all to create my own html table using confiforms data ?? or to overwrite confluence formatting through script?
Alternatively, could I run a script to automatically display a dynamic csv file on a confluence page ?
It looks like my hack was finally overwritten by confluence overnight...
Thanks in advance for sharing your insights..as usual, very valuable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nothing ?
At the very least, I would like to be able to query the rest API within an html macro to get the JSON data ?
I tried to run the below script, but no luck at all ...Could you please advise ?
<script type="text/javascript">
AJS.$.ajax({
url: 'http://localhost:8090/ajax/confiforms/rest/filter.action?pageId=1671243&f=formname&q=entry:field'
type: "GET",
dataType: "json",
success: function(data) { AJS.log(data); }
});
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is "q=entry:field" Leave the "q" parameter empty.
Rest API for ConfiForms is documented here
Another option to render a custom table is to use PlainView and use Velocity templating
See this page for the demo https://wiki.vertuna.com/x/AwOXAw
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.