need to program results of a list box...

User 476560 Photo


Registered User
21 posts

On my form I have a list box containing contact names and areas of focus in our organization.
It looks something like this:
Mary Smith - re submission of articles
John Wilson - re advertising
Steve Johnson - Business Manager

I want each selection to be converted to the appropriate email address. If Mary Smith is selected, I want smithmj@gmail.com to be inserted in a hidden field and used in the To: notification.

I know how to do this kind of thing in VB, but I don't know how in this code.
Should I study up on HTML5 or is there another approach?

Thanks.
User 187934 Photo


Senior Advisor
20,271 posts

I'm thinking you want this.
In the form builder under the drop down list there's an option to "Use as Contact List".:cool:
or are you only looking to have a variable?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 476560 Photo


Registered User
21 posts

I'll look into that. I'm trying to avoid any display of the email addresses in order to minimize the junk mail.
Thanks.
User 187934 Photo


Senior Advisor
20,271 posts

There's several ways to hide your email address from bots but it all depends on how you want to use the email address in your form. Google hide email address from bots.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 464893 Photo


Ambassador
1,611 posts

Eric If you direct the person to the example I put up, the script can be easily changed to do what she wants. I logged on and feel woozy now. Chemo today. Come back later when feeling better
The Guy from OZ


User 187934 Photo


Senior Advisor
20,271 posts

I can't find your post Prism.:/
Here's other options to encrypt the addresses.:)
http://www.dynamicdrive.com/emailriddler/

http://www.mailtoencoder.com/

http://davidwalsh.name/php-email-encode-prevent-spam
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 464893 Photo


Ambassador
1,611 posts

This will do the job. You can see in th4 script how to change a statement

I have it working you can check it out here with 3 utilities I use. I will bundle the WFB file up and upload along with the real simple php that gets the selection and prints the download URL.
http://inkmon.org/PForm/PForm.html
The php is quite simple

<?php
error_reporting(E_ALL & ~E_NOTICE);
$file_handle = fopen("PForm/storage/csv/results.csv", "r");// the address where the file is located
while (!feof($file_handle)){
$item = fgetcsv($file_handle, 1024);
if($item=="")Break;// make sure the last entry is used
$lastitem=$item;
}
fclose($file_handle);
$option= $lastitem[0];
If($option=="Snippet")echo "Download URL >> http://inkmon.org/Snippet.zip";
If($option=="Reminder")echo "Download URL >> http://inkmon.org/Reminder.zip";
If($option=="PXConverter")echo "Download URL >> http://inkmon.org/PXConverter.zip";
?>




The Form
http://inkmon.coffeecup.com/storage/PForm.zip


The Guy from OZ



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.