|
31 | 31 | </label>
|
32 | 32 | </p>
|
33 | 33 | <p class="form__row">
|
34 |
| - <input id="contact-name" |
35 |
| - <?php |
36 |
| - if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_name' ) : |
37 |
| - ?> |
38 |
| - class="error"<?php endif; ?> type="text" name="visitor_name" value=" |
39 |
| - <?php |
40 |
| - if ( $contact_form_response['status'] === 'error' ) : |
41 |
| - echo $contact_form_response['values']['visitor_name']; |
42 |
| - endif; |
43 |
| - ?> |
44 |
| - " required> |
| 34 | + <input |
| 35 | + id="contact-name" |
| 36 | + <?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_name' ) : ?> |
| 37 | + class="error" |
| 38 | + <?php endif; ?> |
| 39 | + type="text" |
| 40 | + name="visitor_name" |
| 41 | + <?php if ( $contact_form_response && $contact_form_response['status'] === 'error' ) : ?> |
| 42 | + value="<?php echo $contact_form_response['values']['visitor_name']; ?>" |
| 43 | + <?php endif; ?> |
| 44 | + required |
| 45 | + /> |
45 | 46 | <label for="contact-name">
|
46 | 47 | <?php _e( 'Your name (required)', 'pressbooks-aldine' ); ?>
|
47 | 48 | </label>
|
48 | 49 | </p>
|
49 | 50 | <p class="form__row">
|
50 |
| - <input id="contact-email" |
51 |
| - <?php |
52 |
| - if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_email' ) : |
53 |
| - ?> |
54 |
| - class="error" <?php endif; ?>type="email" name="visitor_email" value=" |
55 |
| - <?php |
56 |
| - if ( $contact_form_response['status'] === 'error' ) : |
57 |
| - echo $contact_form_response['values']['visitor_email']; |
58 |
| - endif; |
59 |
| - ?> |
60 |
| - " required> |
| 51 | + <input |
| 52 | + id="contact-email" |
| 53 | + <?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_email' ) : ?> |
| 54 | + class="error" |
| 55 | + <?php endif; ?> |
| 56 | + type="email" |
| 57 | + name="visitor_email" |
| 58 | + <?php if ( $contact_form_response && $contact_form_response['status'] === 'error' ) : ?> |
| 59 | + value="<?php echo $contact_form_response['values']['visitor_email']; ?>" |
| 60 | + <?php endif; ?> |
| 61 | + required |
| 62 | + /> |
61 | 63 | <label for="contact-email">
|
62 | 64 | <?php _e( 'Your email address (required)', 'pressbooks-aldine' ); ?>
|
63 | 65 | </label>
|
64 | 66 | </p>
|
65 | 67 | <p class="form__row">
|
66 |
| - <input id="contact-institution" |
67 |
| - <?php |
68 |
| - if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_institution' ) : |
69 |
| - ?> |
70 |
| - class="error" <?php endif; ?>type="text" name="visitor_institution" value=" |
71 |
| - <?php |
72 |
| - if ( $contact_form_response['status'] === 'error' ) : |
73 |
| - echo $contact_form_response['values']['visitor_institution']; |
74 |
| - endif; |
75 |
| - ?> |
76 |
| - " required> |
| 68 | + <input |
| 69 | + id="contact-institution" |
| 70 | + <?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'visitor_institution' ) : ?> |
| 71 | + class="error" |
| 72 | + <?php endif; ?> |
| 73 | + type="text" |
| 74 | + name="visitor_institution" |
| 75 | + <?php if ( $contact_form_response && $contact_form_response['status'] === 'error' ) : ?> |
| 76 | + value="<?php echo $contact_form_response['values']['visitor_institution']; ?>" |
| 77 | + <?php endif; ?> |
| 78 | + required |
| 79 | + /> |
77 | 80 | <label for="contact-institution">
|
78 | 81 | <?php _e( 'Your institution (required)', 'pressbooks-aldine' ); ?>
|
79 | 82 | </label>
|
80 | 83 | </p>
|
81 | 84 | <p class="form__row">
|
82 |
| - <textarea id="contact-message" |
83 |
| - <?php |
84 |
| - if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'message' ) : |
85 |
| - ?> |
86 |
| - class="error" <?php endif; ?>name="message" required> |
87 |
| - <?php |
88 |
| - if ( $contact_form_response['status'] === 'error' ) : |
89 |
| - echo $contact_form_response['values']['message']; |
90 |
| - endif; |
91 |
| - ?> |
92 |
| - </textarea> |
| 85 | + <textarea |
| 86 | + id="contact-message" |
| 87 | + <?php if ( isset( $contact_form_response['field'] ) && $contact_form_response['field'] === 'message' ) : ?> |
| 88 | + class="error" |
| 89 | + <?php endif; ?> |
| 90 | + name="message" |
| 91 | + required |
| 92 | + ><?php if ( $contact_form_response && $contact_form_response['status'] === 'error' ) : ?> |
| 93 | + <?php echo $contact_form_response['values']['message']; ?> |
| 94 | + <?php endif; ?></textarea> |
93 | 95 | <label for="contact-message">
|
94 | 96 | <?php _e( 'Your message (required)', 'pressbooks-aldine' ); ?>
|
95 | 97 | </label>
|
|
0 commit comments