[pmwiki-users] How to output nice table format from fox form?

Mike Turco turco.mike at gmail.com
Thu Jan 26 11:55:42 CST 2012

I meant to send this to the list but I sent this to one of the list
members instead, accidentally. I also got an email from Peter with a
suggestion for my code. I'll implement that in the next day or so and
publish to the list again. This is the email I meant to post earlier:

"Its fixed" (not exactly, but it works!) I took another approach,
which is listed below.

I really appreciate your help! I'm putting together a simple CRM
system for my business, which is basically freelance sales for
developers. I hope to (eventually) post the system as an add on on the
pmwiki site.

For the most part, I've been looking at Fox Contacts and Mark Things
Done as I try to get things figured out. I know I should have posted
the link to my site for you guys to look at, but I've been using real
client information for sample data and the site is password protected.

Here is what worked for me:

This on the page itself:

(:pagelist group={$Group} fmt=#CTList order=-name1 name=-*Contact* list=normal:)

And this is in Site.LocalTemplates

(:template first:)
(:template each:)
(:if equal {<$Group}:)
(:table class=jlist align=center width="98%" :)
(:cell style="background:#e5e5ff;padding-left:3px" :)'''Title'''
(:cell style="background:#e5e5ff;padding-left:3px" :)'''Name'''
(:cell style="background:#e5e5ff;padding-left:3px" :)'''Mobile'''(:if:)
(:cellnr style="background:#eeeeff;padding-left:3px" :)[[{=$FullName}|+]]
(:cell style="background:#eeeeff;padding-left:3px" :){{=$FullName}$:name1}
(:cell style="background:#eeeeff;padding-left:3px" :){{=$FullName}$:mobile}
(:if equal {>$Group}:)

On Wed, Jan 25, 2012 at 3:03 AM, Mike Turco <turco.mike at gmail.com> wrote:
> Hi,
> I'm going through the learning curve on pmwiki and fox, and don't have
> a lot of experience with PHP and the like (although I do have some).
> I loaded pmwiki on a site of mine along with some of the fox forms
> add-ons. Then I loaded the Contacts example that goes along with fox
> forms. I'm trying to create a formatted table based on data within the
> contact forms.
> I'm sure I have the field names (PTV's??) correct.
> This is what does not work:
> This is on the page itself:
> (:pagelist fmt=Site.LocalTemplates#contactlist order=-name1
> group=Contacts count=4:)
> This is in Site.LocalTemplates:
> [[#contactlist]]
> (:if equal {<$Group}:)
> (:table width="90%" :)
> (:cell style="background:#e5e5ff;padding-left:5px" :)'''Name'''
> (:cell style="background:#e5e5ff;padding-left:5px" :)%thd%'''Mobile'''
> (:cellnr style="background:#eeeeff;padding-left:5px" :){{=$FullName}$:name1}
> (:cell style="background:#eeeeff;padding-left:5px" :){{=$FullName}$:mobile}
> (:if equal {>$Group}:)
> (:tableend:)(:if:)
> [[#contactlist]]
> Here is something that does work, but there is no formatting of the
> table. All of the following has been typed into the page itself.
> (:pagelist group={$Group} list=normal fmt=#customlist name=-*Contact*:)
> (:if false:)
> [[#customlist]]
> (:template first:)
> ||
> ||!Name ||!Mobile ||!Email ||
> (:template each:)
> ||[[{=$FullName}|+]] ||{{=$FullName}$:mobile} ||{{=$FullName}$:email} ||
> [[#customlistend]]
> (:ifend:)
> As far as I can tell, the problem with the first (broken) example is
> that I am using the wrong format for field names. I've done quite a
> lot of searching and reading on the website, but am feeling a bit
> lost.
> Thanks!
> Mike
> --
> Mike Turco
> Phone: (310) 714-9669
> Access Development: http://miketurco.com
> Access Downloads: http://miketurco.com/category/downloads

More information about the pmwiki-users mailing list