[Nfb-web] help with my email list script

erik burggraaf burggraaferik at gmail.com
Fri Mar 27 23:17:57 UTC 2015


Hi List,

This is the email list script I've been talking about.

Here is a link to the test page.
http://www.erik-burggraaf.com/pmwiki/pmwiki.php?n=Site.MailingLists

OK, two problems with this script.  First, if you tab through the radiobuttons with a screen reader they don't say what any of them are for.  If you arrow up and down it's obvious, but I'd like to add an element that would make screen readers speak the value.  What element am I looking for?

Second, and this is the show stoper bug.  The original script called for only one email list.  I have two.  I have discuss and announce.

Right now, my code is subscribing people to discuss, no matter whether they are trying to subscribe to discuss or announce.  The confirmation message after subscribing shows whichever list has been asked for, but the script always emails discuss, even when announce is called for.

Here is the source code and documentation for the original script.
http://www.pmwiki.org/wiki/Cookbook/MailListForm

Note that I had this cript installed and working exactly as per the directions before I started mucking with it.

There are two files associated with this script.
One is the config.php file which is responsible for global site configuration.
The code related to the mail form script begins on line 56.  The part that I modified ends on line 61, and the entire code ends on line 67.

The second file is the email list form script itself.
My code appears on line's 36, 37, 64 through 71, 105, and 132.

The more I think about it, the more I think I haven't declared the $Choice variable in the right place.  Because the variable $EMailListFormAddresses that $choice is testing for is a global variable, but $choice itself is only a script level variable.  I'm just not sure what I have to do to declare that variable properly so that it can test for $EMailListFormAddresses.

The code is in my dropbox.
https://dl.dropboxusercontent.com/u/1291668/Email%20script.zip

I'd appreciate any help with this.  

Thanks all, and have a relaxing weekend,


ERik



More information about the NFB-Web mailing list