I've used chronoforms to create a simple event registration page where people can register for one or more events, and have set up a chronoconnectivity connection that displays everyone who's registered for the first event... but I can't figure out how to get it to display numbers next to the registrants. Just 1, 2, 3, 4, etc. Just so we can see at a glance how many people have registered for that event.
The page is here -
http://ontariowalks.com/index.php?option=com_chronoconnectivity&connectionname=Launch_Registrants
Any assistance would be greatly appreciated.
The page is here -
http://ontariowalks.com/index.php?option=com_chronoconnectivity&connectionname=Launch_Registrants
Any assistance would be greatly appreciated.
Hi chriscaple,
This should be simple - either the array index or a simple counter will do it. What's the code you are using to show these records?
Bob
This should be simple - either the array index or a simple counter will do it. What's the code you are using to show these records?
Bob
Hi Bob,
It's kind of dumb the way I set up the original form, but... in the connection, in the where box, I have this:
And then in the body area I've got
I don't really know a lot of php/mysql, so... if you could spell out what to insert & where I'd be forever in your debt. Metaphorically.
It's kind of dumb the way I set up the original form, but... in the connection, in the where box, I have this:
WHERE check0="Sunday April 19th - Season Launch - Guildwood Inn"
And then in the body area I've got
<tr><td>{need number here} <br>Name: {firstname} {lastname} <br>Email: {email}
<br><br></tr></td>
I don't really know a lot of php/mysql, so... if you could spell out what to insert & where I'd be forever in your debt. Metaphorically.
Hi chriscaple,
Try this: In the header add
Bob
Try this: In the header add
<?php $count = 1; ?>
and in the body<tr><td><?php echo $count; $count++; ?><br>Name: {firstname} {lastname} <br>Email: {email}
<br><br></tr></td>
Bob
Perfect! Thanks so much!
Hello,
I know that this is an old topic so I just wanted to see if I need to do something different to get the count feature working next to my results.
For the header:
This is what I have for the Body:
But unfortunately the count is not appearing next to my results. Any ideas?
Thanks,
Ryan
I know that this is an old topic so I just wanted to see if I need to do something different to get the count feature working next to my results.
For the header:
<?php $count = 1; ?>
<table>
<thead bgcolor="#FFFFFF">
<tr>
<th><strong>#</strong></th><th><strong>Technician</strong></th><th><strong>Customer Last Name</strong></th><th><strong>Account Number</strong></th><th><strong>Owed to Customer</strong></th><th><strong>Appointment Scheduled</strong></th>
</tr>
</thead>
<tbody>
This is what I have for the Body:
<tr><td><?php echo $count; $count++;?></td><td><?php if ($_POST['techs'] == "other"){
echo "{tech_other}";}
else echo "{techs}" ?></td><td>{cust_lname}</td><td>{hidden_account_num}</td><td>{specify_owed_to_cust}</td><td>{appointment_scheduled}</td></tr>
But unfortunately the count is not appearing next to my results. Any ideas?
Thanks,
Ryan
Hi relliott,
The variable scope is limited to the individual snippet so the value isn't carried forward. Try adding global $count; to each of these boxes to allow it to be carried across:
Bob
The variable scope is limited to the individual snippet so the value isn't carried forward. Try adding global $count; to each of these boxes to allow it to be carried across:
<?php
global $count;
$count = 1;
?>
Bob
Hello GreyHead,
I have changed the Body code on the connection to this:
But the Index # (count of how many listings their are) is just showing all 1's now (see attached image). I am wanting it to say 1, 2, 3, 4 , 5........
Thanks for the help!
Cheers,
Ryan
I have changed the Body code on the connection to this:
<tr><td style="padding:5px"><?php
global $count;
$count = 1;
echo $count++?></td><td style="padding:5px"><?php if ($_POST['techs'] == "other"){
echo "{tech_other}";}
else echo "{techs}" ?></td><td style="padding:5px">{cust_lname}</td><td style="padding:5px">{hidden_account_num}</td><td style="padding:5px">{specify_owed_to_cust}</td><td style="padding:5px">{appointment_scheduled}</td><td style="padding:5px">{date}</td></tr>
But the Index # (count of how many listings their are) is just showing all 1's now (see attached image). I am wanting it to say 1, 2, 3, 4 , 5........
Thanks for the help!
Cheers,
Ryan
This topic is locked and no more replies can be posted.