PluginProbe
HTML Forms – Simple WordPress Forms Plugin / 1.1
HTML Forms – Simple WordPress Forms Plugin v1.1
1.7.0 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.3.0 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.16 All 67 releases
html-forms / views / tab-submissions-detail.php

tab-submissions-detail.php in HTML Forms – Simple WordPress Forms Plugin 1.1, at views/tab-submissions-detail.php

87 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) or exit;
4 $datetime_format = sprintf('%s %s', get_option( 'date_format' ), get_option( 'time_format' ) );
5 ?>
6
7 <h2><?php _e( 'Viewing Form Submission', 'html-forms' ); ?></h2>
8
9 <div>
10 <style type="text/css">
11 table.hf-bordered {
12 font-size: 13px;
13 border-collapse: collapse;
14 border-spacing: 0;
15 background: white;
16 width: 100%;
17 table-layout: fixed;
18 }
19
20 table.hf-bordered th,
21 table.hf-bordered td {
22 border: 1px solid #ddd;
23 padding: 12px;
24 }
25
26 table.hf-bordered th {
27 width: 160px;
28 font-size: 14px;
29 text-align: left;
30 }
31 </style>
32
33 <div class="hf-small-margin">
34 <table class="hf-bordered">
35 <tbody>
36 <tr>
37 <th><?php _e( 'Timestamp', 'html-forms' ); ?></th>
38 <td><?php echo date( $datetime_format, strtotime( $submission->submitted_at ) ); ?></td>
39 </tr>
40 <tr>
41 <th><?php _e( 'User Agent', 'html-forms' ); ?></th>
42 <td><?php echo esc_html( $submission->user_agent ); ?></td>
43 </tr>
44 <tr>
45 <th><?php _e( 'IP Address', 'html-forms' ); ?></th>
46 <td><?php echo esc_html( $submission->ip_address ); ?></td>
47 </tr>
48 <tr>
49 <th><?php _e( 'Referrer URL', 'html-forms' ); ?></th>
50 <td><?php echo sprintf( '<a href="%s">%s</a>', esc_attr( $submission->referer_url ), esc_html( $submission->referer_url ) ); ?></td>
51 </tr>
52 </tbody>
53 </table>
54 </div>
55
56 <div class="hf-small-margin">
57 <h3><?php _e( 'Fields', 'html-forms' ); ?></h3>
58 <table class="hf-bordered">
59 <tbody>
60 <?php
61 if( is_array( $submission->data ) ) {
62 foreach( $submission->data as $field => $value ) {
63 if( is_array( $value ) ) {
64 $value = join( ', ', $value );
65 }
66 $value = esc_html( $value );
67 echo '<tr>';
68 echo sprintf( '<th>%s</th>', esc_html( ucfirst( strtolower( $field ) ) ) );
69 echo sprintf( '<td>%s</td>', nl2br( $value ) );
70 echo '</tr>';
71 }
72 } ?>
73 </tbody>
74 </table>
75 </div>
76
77 </div>
78
79 <div class="hf-small-margin">
80 <h3><?php _e( 'Raw', 'html-forms' ); ?></h3>
81 <pre class="hf-well"><?php print_r( $submission ); ?></pre>
82 </div>
83
84 <div class="hf-small-margin">
85 <p><a href="<?php echo esc_attr( remove_query_arg( 'submission_id' ) ); ?>">&lsaquo; <?php _e( 'Back to submissions list', 'html-forms' ); ?></a></p>
86 </div>
87