This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
view_entry.php changes?
Started 16 years ago by webcommerce | 3 posts |
-
I want to add to the Title line on the Entry printout of view_entry.php. I have located the relevant code on lines 116 - 121 for the defaults of $form_name and $entry_id.
I would like to include [Date Created] and our field [Customer Code] to this line so the relevant form data is clearly identified in the header.
Can anyone help me with the code to do this?
Thanks.
Ron SPosted 16 years ago # -
Hi,
Go to around line 83~84 in "view_entry.php" and insert this code :
//get data for header $result = do_query("select date_created,element_1 from ap_form_{$form_id} where id = $entry_id limit 1"); $row = do_fetch_result($result); $date_created = $row['date_created']; $order_no = $row['element_1'];
I assume your "customer code" data using element_1, you should change the element number based on "customer code" element number. after that you can replace the code between line 116 - 121 that you mention with this one :
<div class="info"> <h2><a class="breadcrumb" href="manage_form.php?id=<?php echo $form_id; ?>"><?php echo $form_name; ?></a> <img src="images/icons/resultset_next.gif" align="bottom" /> <a id="ve_a_entries" class="breadcrumb" href="manage_entries.php? id=<?php echo $form_id; ?>">Entries</a> <img id="ve_a_entries" src="images/icons/resultset_next.gif" align="bottom" /> #<?php echo $entry_id; ?> <img src="images/icons/resultset_next.gif" align="bottom" /><?php echo $order_no; ?> <img src="images/icons/resultset_next.gif" align="bottom" /> <?php echo $date_created ;?> </h2> Viewing entry #<?php echo $entry_id; ?> </div>
I hope it clear for you, little messy up there :)
MachForm Support
Posted 16 years ago # -
Thanks mate, I'll give it a go as soon as I get a chance.
Appreciate the fast feedback atypical of this forum!
Have a great day.Ron S
Posted 16 years ago #
Reply
You must log in to post.