Popular
Newest
Updated
Sign in
Create an account
Categories
Admin Templates
197
Multipurpose Templates
164
Landing Pages
151
Portfolios & Resumes
86
Ecommerce
45
Blogs & Magazines
26
Directories & Listings
26
UI Kits & Website Builders
10
Documentation
5
Specialty
103
Topics
General
273
Business & Corporate
115
Design & Creative Services
114
Apps & Software
52
Retail & Shopping
33
Startups & SaaS
27
Marketing & Conversion
21
Restaurants & Cafes
17
Education & Learning
16
Finance & Accounting
16
See all →
Compatible with
Bootstrap
767
React
41
PHP
38
Tailwind CSS
37
Laravel
25
Angular
23
Python
23
Vue.js
21
Django
20
ASP.NET Core
14
See all →
Discussion on
Lamap - Multi-Purpose Landing Page
Details
Discussion
Back to discussions
Showing 1 – 1 of 1 replies
←
1
→
Team I would like to add another field […]
mmoldaschl
PURCHASED
8 years ago
hi team
i would like to add another field to the newsletter contact form
I have added
<input name="name1" type="text" id="name1" size="30" value="" placeholder="Please enter your name"/><p><p>
to the main page
and added
$name1 = $_POST['name1'];
to contact.php as well as
$e_reply = "NAME: $name1" . PHP_EOL ."EMAIL: $email";
But the email sent only includes the email...
any help very much appreciated!
M
Reply
ThemeGuru
SELLER
8 years ago
Hi mmoldaschl,
Add this to the HTML form:
<input name="name" type="text" id="name" size="30" value="" placeholder="Please enter your name"/><p><p>
And add this to the PHP file:
$name = $_POST['name'];
if(trim($name) == '') {
echo '<div class="error_message">Attention! You must enter your name.</div>';
exit();
}
$e_reply = "Name: $name, Email: $email";
I just tested it and it looks like it doesn't work when you use the digit in the php variable. If you just use 'name' it works.
Regards
Reply
Close
Team I would like to add another field […]
i would like to add another field to the newsletter contact form
I have added
<input name="name1" type="text" id="name1" size="30" value="" placeholder="Please enter your name"/><p><p>
to the main page
and added
$name1 = $_POST['name1'];
to contact.php as well as
$e_reply = "NAME: $name1" . PHP_EOL ."EMAIL: $email";
But the email sent only includes the email...
any help very much appreciated!
M
Add this to the HTML form:
<input name="name" type="text" id="name" size="30" value="" placeholder="Please enter your name"/><p><p>
And add this to the PHP file:
$name = $_POST['name'];
if(trim($name) == '') {
echo '<div class="error_message">Attention! You must enter your name.</div>';
exit();
}
$e_reply = "Name: $name, Email: $email";
I just tested it and it looks like it doesn't work when you use the digit in the php variable. If you just use 'name' it works.
Regards