Developer Support »

Option to sort fields affecting custom code for selecting recipients  (See more user questions)

Aaaaaaaaarrrgghhh!!! Shame on me missing that! Getting caught out with my
own code. Got caught out with the very same thing before! I first wrote
the Pro script four years ago, some of the code dates from then and
sometimes I forget how it works (without revisiting it).

Correct. If using a template you would simply not include the recipient
field. That only affects the message, not the functionality.

Well done you and good luck with the Admin, they will love it!

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Friday, November 19, 2010 11:28 AM
Subject: Re: FormToEmail script


> Charles,
>
> Many thanks for your feedback and hard work to get this rascal to
> function. I made all the changes suggested and reviewed the W3
> validations...still no joy. BCC worked fine no matter what email address I
> used but the selected recipient would not get the email.
>
> BUT, I looked at the script's code and made a small change in the field
> order keys variable, adding the recipient field:
>
> $field_order_keys = array('recipient','name','email','message');
>
> The emails sent every time! :) Whoo hoo!
>
> Of course the recipient number shows in the email but I can make that go
> away via a template, correct?
>
> I want to that you for an enjoyable, non-offensive interaction as we
> worked on this issue. Now I am off to tweak the final output and show the
> school's administration, to get their approval.
>
> Best regards,
>
> On 11/18/2010 4:55 PM, FormToEmail.com wrote:
>> Hello again, .
>>
>> Your script looks good. On the face of it, it should work. Running out
>> of ideas now, but some things to try/rule out.
>>
>> The syntax is wrong, here:
>>
>> $fields_to_ignore = array('Submit','submit,Send');
>>
>> I would make it:
>>
>> $fields_to_ignore = array('Submit','submit','Send');
>>
>> That said, you only have one submit button, which isn't named (in itself
>> not a problem) so the above check doesn't come into play anyway.
>>
>> You don't have quotes on these form input types:
>>
>> <td>Your Name: </font></td><td><input type=text size=30 name="name"></td>
>> </tr><tr>
>> <td>Your Email: </font></td><td><input type=text size=30
>> name="email"></td>
>>
>> <input type=submit value=" Send ">
>>
>> I would change them to:
>>
>> <td>Your Name: </font></td><td><input type="text" size=30
>> name="name"></td>
>> </tr><tr>
>> <td>Your Email: </font></td><td><input type="text" size=30
>> name="email"></td>
>>
>> <input type="submit" value=" Send ">
>>
>> I'm not even sure if they are required (depends on the doctype?) but I
>> always see them with quotes and always use quotes myself (plus I'm
>> getting a bit desperate now, trying to figure this out!).
>>
>> The validator is showing some errors on the form page:
>>
>> ttp://validator.w3.org/check
>>
>> I would get rid of them. Rule them out if nothing else.
>>
>> That's about it.
>>
>> Just a point, I see you have this note on the form:
>>
>> "Note: if the "To" field is left showing "Please choose one" the desired
>> recipient will not receive the message."
>>
>> You can make the "To " field a required field. Put the field name
>> (recipient) in the required fields array and set an empty value for
>> "Please choose one:" like so:
>>
>> <option value="">Please choose one:</option>
>>
>> That way if a recipient isn't selected, an empty value gets posted which
>> would be picked up by the required fields check.
>>
>> If nothing else but to rule them out, I would make the above
>> changes/corrections. See how it goes then.
>>
>> Best wishes.
>>
>> Charles Sweeney
>> https://formtoemail.com
>> The world's easiest feedback script!
>>
>> ----- Original Message -----
>> Sent: Thursday, November 18, 2010 6:03 PM
>> Subject: Re: FormToEmail script
>>
>>
>>> Charles,
>>>
>>> I have sent to several array email selections, even swapping out one
>>> email address with several of mine. None ever arrived unless I made them
>>> the BCC address; then they arrived each and every time. The BCC test was
>>> to make sure they were not getting blocked.
>>>
>>> I tried everything before I emailed ya just because I wanted to
>>> eliminate all those variables.
>>>
>>> I am attaching the script file again, just in case.
>>>
>>> Thanks for your time.
>>>
>>>
>>> On 11/18/2010 12:23 PM, FormToEmail.com wrote:
>>>> Just a point , how do you know it didn't work? How many of those
>>>> emails in the list did you test it with? The email might be getting
>>>> rejected at the receiving end, very common these days, over-zealous
>>>> anti-spam systems.
>>>>
>>>> Charles Sweeney
>>>> https://formtoemail.com
>>>> The world's easiest feedback script!
>>>>
>>>> ----- Original Message -----
>>>> Sent: Thursday, November 18, 2010 3:48 PM
>>>> Subject: Re: FormToEmail script
>>>>
>>>>
>>>>> Charles,
>>>>>
>>>>> Thanks for a review of the file. I had placed the line in the
>>>>> suggested location and also in place of the "standard" line at the
>>>>> top of the script. I moved it back down to below the array as
>>>>> suggested (and above the send line), still no joy. My bcc emails
>>>>> arrived, though.
>>>>>
>>>>> Very frustrating as I want so badly for this script to work.
>>>>> Challenging, huh? Any other ideas?
>>>>>
>>>>>
>>>>> On 11/18/2010 9:09 AM, FormToEmail.com wrote:
>>>>>> Ah! As soon as I read this I remembered!
>>>>>>
>>>>>> You've done a good job with the coding but you forgot one line!
>>>>>> This one:
>>>>>>
>>>>>> $my_email = $recipients[$_REQUEST['recipient']];
>>>>>>
>>>>>> It goes above the mail line in the script, like so:
>>>>>>
>>>>>> $my_email = $recipients[$_REQUEST['recipient']];
>>>>>>
>>>>>> mail($my_email,$subject,$message,$headers);
>>>>>>
>>>>>> Best wishes.
>>>>>>
>>>>>> Charles Sweeney
>>>>>> https://formtoemail.com
>>>>>> The world's easiest feedback script!
>>>>>>
>>>>>> ----- Original Message -----
>>>>>> Sent: Thursday, November 18, 2010 12:08 PM
>>>>>> Subject: Re: FormToEmail script
>>>>>>
>>>>>>
>>>>>>> Charles,
>>>>>>>
>>>>>>> No problems with the CAPTCHA, it is with the emails not sending
>>>>>>> from the array. See below.
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> On 11/17/2010 3:39 PM, FormToEmail.com wrote:
>>>>>>>> Hi ...you've been busy!
>>>>>>>>
>>>>>>>> If you attach your edited script and give me the URL of the form
>>>>>>>> page, I will check them out for you.
>>>>>>>>
>>>>>>>> Best wishes.
>>>>>>>>
>>>>>>>> Charles Sweeney
>>>>>>>> https://formtoemail.com
>>>>>>>> The world's easiest feedback script!
>>>>>>>>
>>>>>>>> ----- Original Message -----
>>>>>>>> Sent: Wednesday, November 17, 2010 6:19 PM
>>>>>>>> Subject: FormToEmail script
>>>>>>>>
>>>>>>>>
>>>>>>>>> Comments: Hello,
>>>>>>>>>
>>>>>>>>> I need assistance with the Pro version, multi-license, which I
>>>>>>>>> purchased a couple of days ago.
>>>>>>>>>
>>>>>>>>> I am a web designer managing 30+ websites, for over 10 years. I
>>>>>>>>> am very familiar with HTML forms and PHP file setups.
>>>>>>>>>
>>>>>>>>> The server where the form is being installed uses PHP version
>>>>>>>>> 5.2.14. There are 3 other web form processors on this server all
>>>>>>>>> working fine.
>>>>>>>>>
>>>>>>>>> The client is a school. They wanted all 93 contacts to be
>>>>>>>>> available on their website contact form, selectable via a drop
>>>>>>>>> down box. I have the form setup, configured to the code shown on
>>>>>>>>> your website but no matter how I try, the array does not seem to
>>>>>>>>> capture the selected recipient and send the email to them.
>>>>>>>>>
>>>>>>>>> The form works fine (sends a bcc copy to me, creates the csv
>>>>>>>>> file, posts the thank you message after submitting, etc.) I just
>>>>>>>>> can't seem to make the array work.
>>>>>>>>>
>>>>>>>>> There are no error messages displayed. I have verified there are
>>>>>>>>> no spam filters preventing delivery of the email (I have used one
>>>>>>>>> of the array emails as the bcc email), I have verified I have not
>>>>>>>>> left out any quotes or comma's or semi-colons.
>>>>>>>>>
>>>>>>>>> I have read through the instructions many times, verifying the
>>>>>>>>> setup is correct. I would love to get this excellent program
>>>>>>>>> setup for the school very soon.
>>>>>>>>>
>>>>>>>>> Let me know what questions you have for me, I'll be happy to
>>>>>>>>> reply.
>>>>>>>>>
>>>>>>>>> Thanks!