Author Topic: Required Fields  (Read 2135 times)

rick2

  • Posts: 1
    • View Profile
Required Fields
« on: September 01, 2004, 01:02:38 am »
Hi, Is there a way that I can make a new Custom List Field a required field for users to compete when filling out the subscribe form? If so, how do I go about it? Cheers.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Required Fields
« Reply #1 on: September 13, 2004, 12:19:01 pm »
Unfortunately this feature isn't in the current release.  I know, it should be.  :oops:

A workaround is to use JavaScript on your signup form, ie:

Code: [Select]
<form name=frm1 method=post action=http://site.com/mail/signup.php onsubmit="if(!frm1.user1){ alert('You must enter the required data!'); return false; } else { return true; }">
<input type=text name=user1>
<input type=submit value="Subscribe">
</form>
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

chris6

  • Posts: 93
    • View Profile
Mandatory
« Reply #2 on: February 24, 2005, 04:48:58 am »
<form name=frm1 method=post action=http://www.yourbusinesssuccess.co.uk/mail/signup.php
onsubmit="if(!frm1.user1){ alert('You must enter the required data!'); return false; } else { return true; }">
<input type=hidden name=list value=1>
First Name: <input type=text name=fname size=10><br>
Last Name: <input type=text name=lname size=10><br>
Email: <input type=text name=email><br>
Telephone Number: <input type=text name=user1><br>
<input type=submit value="Subscribe">
</form>

I want to have telephone number and email be mandatory and can't get it using what you recommended with the java script above?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Required Fields
« Reply #3 on: February 24, 2005, 02:53:21 pm »
Try this:

Code: [Select]
<form name=frm1 method=post action=http://www.yourbusinesssuccess.co.uk/mail/signup.php
onsubmit="if(!frm1.user1 || !frm1.email){ alert('You must enter the required data!'); return false; } else { return true; }">
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

chris6

  • Posts: 93
    • View Profile
Required fields
« Reply #4 on: August 07, 2005, 10:53:03 pm »
<form name=frm1 method=post action=http://www.planetearthradio.com/mail/signup.php
onsubmit="if(!frm1.user1 || !frm1.email){ alert('You must enter the required data!'); return false; } else { return true; }"><font face="Verdana"><input type="hidden" name="list" value="17"></font>
<p><font face="Verdana"><font size="2">First
Name: <input type="text" name="fname" size="15"><br>
Last Name: <input type="text" name="lname" size="15"><br>
Email:<input type="text" name="email" size="25"><br>
Country:<select name=user1>


I have still not got this form to work that you suggested.  You can still bypass the second required field
I want to have the Country field as a required field

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Required Fields
« Reply #5 on: August 08, 2005, 04:17:24 pm »
This section "if(!frm1.user1" should ensure that the Country field contains data.  Did you complete the </select> tag, create a Submit button, and finish the </form>?

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Required Fields
« Reply #6 on: August 09, 2005, 09:50:10 am »
Okay, I believe i have found the problem.  Change
Code: [Select]
if(!frm1.user1 || !frm1.email)to
Code: [Select]
if(!frm1.user1.value || !frm1.email.value)

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting