This form is receiving a lot of spams and I would like some advice on what I can do to prevent it.
I should not use any plugins nor any Captcha.
function innerpages_form($atts, $content = null)
{
session_start();
// Attributes
extract(
shortcode_atts(
array(
'title' => '',
),
$atts
)
);
// Code
//global $wp_session;
return ' <div class="sell-fast-form">
<form action="/sell-now/" method="post" id="myForm">
<h2 style="color:#f15a29">Need To Sell Your House Fast?</h2><br>
<h2>Property Address</h2>
<input type="text" class="Property_Address" name="Property_Address" id="addr" placeholder="Property Address" value="" required >
<h2>Phone</h2>
<input type="text" class="Phone" name="Phone" placeholder="Phone" id="Phone" pattern="^[(]{0,1}[0-9]{3}[)]{0,1}[-\s\.]{0,1}[0-9]{3}[-\s\.]{0,1}[0-9]{4}$" required title="xxx-xxx-xxxx" >
<h2>Email</h2>
<input type="Email" class="Email" name="Email" placeholder="Email" id="Email" value="" required >
<input style="display:none;" type="text" name="robots" value="" />
<input type="submit" class="click_here" onsubmit="return myFunction();" value=" GET MY FAIR CASH OFFER >>>"/>
<script>
function myFunction() {
document.getElementById("myForm").submit();
return false;
}
</script>
</form>
</div>
';
}
add_shortcode('innerpages_form', 'innerpages_form');