- This topic has 3 replies, 3 voices, and was last updated 11 years, 10 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › eStore – Squeeze Form – Not require Name, just email
Hi, I am giving away a free download on my site in exchange for signing up to the mailing list — so I am using the squeeze form <?php echo eStore_free_download_form(2); ?>
Iv’e hacked away at it to get it styled how I would like, but I only want to require an Email address for the user and have only one form to fill in. But I get an error message when there’s nothing in the name field. “Name or email address is missing!”
How can I only require email the address?
Thanks for any help!
Try adding a hidden field on your form with the same name as the form’s name field, and assign it a value like “foo.” Then, periodically do something like have your db replace all name fields where value = “foo” to value = “”.
You could also tweak an eStore file to change this. Open the “eStore_misc_functions.php” file and search for the following:
if (empty($_POST['cust_name']) || empty($_POST['cust_email'])) {
Once you find it, change it the following:
if (empty($_POST['cust_email'])) {
That should remove the “name” field requirement.
Thank you! that worked great!
Although I’m afraid I must have hacked something wrong.
Now if someone enters a bad email address, the form disappears and everything in the code after it disappears as well. I’ve been scouring trying to find the “BAD EMAIL” function but with no luck. Does anyone have any idea what could be causing this? Or where that function is found in the code?