Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:55:00+00:00 2026-06-13T16:55:00+00:00

I have a form that asks for First/Last name, email and phone. I don’t

  • 0

I have a form that asks for First/Last name, email and phone. I don’t want to use “placeholder” since IE lacks that ability. I have tried many things but do not know enough about script coding on how I can strip the default text out of the field when someone submits their information.

I need to find a way to have the code below only send me the data for the fields typed in and not the txt from the form like “Phone

<form action="{SUBMIT_FORM}" method="post">

<input type="text" class="input-field"  onblur="if (this.value == '') {this.value = '*First Name : (Required Field)';}" onfocus="if (this.value == '*First Name : (Required Field)') {this.value = '';}" name="{lead_first_name}" id="{lead_first_name}" value="*First Name : (Required Field)"/>
<input type="text" class="input-field"  onblur="if (this.value == '') {this.value = 'Last Name :';}" onfocus="if (this.value == 'Last Name :') {this.value = '';}" name="{lead_last_name}" id="{lead_last_name}" value="Last Name :"/>
<input type="text" class="input-field"  onblur="if (this.value == '') {this.value = '*Email : (Required Field)';}" onfocus="if (this.value == '*Email : (Required Field)') {this.value = '';}" name="{lead_email}" id="{lead_email}" value="*Email : (Required Field)"/>
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = 'Phone :';}" onfocus="if (this.value == 'Phone :') {this.value = '';}" name="{lead_home_phone}" id="{lead_home_phone}" value="Phone :"/>
<input type="submit" class="sbt-btn" value="Submit"  onclick="{SUBMIT_SCRIPT}" />

{VALIDATE_SCRIPT}
</form>
<small>*We promise to never share, rent or sale your personal information.</small>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:55:02+00:00Added an answer on June 13, 2026 at 4:55 pm

    Here’s how I do it on a simple text input. HTML:

    <form id="myemailform">
      <input class="text email" type="text" name="email" value="Enter e-mail address"/>
      <input type="submit" value="Submit">
    </form
    

    Jquery:

    <script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $('input.text').each(function() {
            $.data(this, 'default', this.value);
        }).focus(function() {
            if (!$.data(this, 'edited')) {
                this.value = "";
            }
        }).change(function() {
            $.data(this, 'edited', this.value != "");
        }).blur(function() {
            if (!$.data(this, 'edited')) {
                this.value = $.data(this, 'default');
            }
        });
    
        $('#myemailform').submit(function() {
            if($(".email").val() == "Enter e-mail address") {$(".email").val("");}
            return true;
        });
    });
    </script>
    

    The javascript looks for input.text elements and removes the placeholder text on focus, blur, or change. If the form is submitted with the placeholder text in place, it removes the placeholder text first before submitting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that asks a user for their first name, last name,
I have a form that includes the first name and last name of a
I have made a form that asks the user to put in first name
I have an online form. for example it asks for first name and last
I have a form that asks for a email and city. The city select
(I'm using Symfony2) I have a form that asks for the name and the
I use a registration form that asks users to enter their full name into
I have a form that I want to be validated before showing it initially.
I have a form that sends money value e.g <input type=text name=amount value=N50,000.00 NGN
I have a form that i want to appear at the top of every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.