ListMailPRO Email Marketing Software Forums

ListMailPRO Email Marketing Software Forums => General Help & How-To => Topic started by: josephsimon on December 08, 2004, 02:38:16 am

Title: Multiple Subscriptions
Post by: josephsimon on December 08, 2004, 02:38:16 am
I have my form set up for multiple subscription check boxes.  But if someone does not select at least one.  They will get the following error:

Warning: Variable passed to each() is not an array or object in /home/mydenta/public_html/mail_list/signup.php on line 57

Warning: reset(): Passed variable is not an array or object in /home/mydenta/public_html/mail_list/signup.php on line 123

Warning: Variable passed to each() is not an array or object in /home/mydenta/public_html/mail_list/signup.php on line 126

How can I set it up to give them a custome error message like "you must select at least one subscription"?

Cheers,
JSI
Title: Multiple Subscriptions
Post by: DW on December 08, 2004, 09:24:32 am
Hmm, an error check for this could be missing.  I will have to look into it.

For now, I recommend using JavaScript in your form.  Something like this could work:

Code: [Select]
<form method=post action=http://yoursite.com/mail/signup.php onsubmit="if(!lists[0]){ alert('You must select at least one list!'); return false; }">
</form>
Title: Multiple Subscriptions
Post by: porl on January 04, 2005, 11:09:52 pm
I had that problem as well.
got around it by putting in a hidden field so that everyone goes onto a hidden master list.
Hope that helps.