Sending email with a list

Issues related to forms.
Post Reply
Daniel
 
 
Posts: 10
Joined: Sat Feb 16, 2019 12:24 pm

Sending email with a list

Post by Daniel »

Hi

I create a form where we have a drop list you can choose an individual.

I would like to choose an individual from that drop list, fill the comment box and send an email to the individual I pick in the list.

Would it be possible, if yes a couple hints will help me out to achive this.

Thanks
Daniel
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Sending email with a list

Post by Pablo »

This functionality is documented in the help:
Form -> Form processing -> It is also possible to use a combobox as the source for the destination email address.....
User avatar
crispy68
 
 
Posts: 2913
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Sending email with a list

Post by crispy68 »

I am trying to implement this into my form but having an issue. Has anyone used this and have it working? I'm pretty sure I followed the steps correctly but I could be missing something. I'm getting this error in the error log on the page where my form is:

[04-Mar-2023 21:13:23 UTC] PHP Notice: Undefined index: $MAILTO$ in /home/......../public_html/index.php on line 99

The directions say:

1. Set the 'Email address' property of the form to $MAILTO$

this is what I have:

Image

2. Add a combobox and set the 'name' property to $MAILTO$

3. Add multiple items to the combobox where the name is a name or department and the value is the email address.

this is what I have for both:

Image

I can fill in all of the fields and hit submit and do get sent to the success page but no emails are sent due to the error in the error log. If anyone has gotten this to work successfully and can provide what they filled in all their fields that would be very helpful. You can email me screenshots to ron@wizbangwebdesign.com.
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Sending email with a list

Post by Pablo »

There should not be any references to $MAILTO$' in the final code. So, there is a mistake somewhere.
To be able to help you, I need a demo project so I can see all settings.
User avatar
crispy68
 
 
Posts: 2913
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Sending email with a list

Post by crispy68 »

Hey Pablo,

I have sent you a demo project link via email. I'm sure it's something i've done incorrectly.
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Sending email with a list

Post by Pablo »

The reason why it does not work, is because the combobox should be a direct child element of the form.
In your case, you have nested another layout grid. So, the form cannot 'see' the combobox.
User avatar
crispy68
 
 
Posts: 2913
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Sending email with a list

Post by crispy68 »

oh bummer. Without the nested grid, then the look of my form wont work.
User avatar
crispy68
 
 
Posts: 2913
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Sending email with a list

Post by crispy68 »

Any Ideas on a workaround? Whether to make it work or somehow keep the design I have?
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Sending email with a list

Post by Pablo »

I'm sorry, I cannot think of a workaround.
The combobox needs to be a directly child of the form, otherwise the $MAILTO$ trick will not work.
It will be a lot more complicated to add support for nested grids, because then WWB needs to keep track of all child elements of nested grids and the combobobox need to figure out which form it belong to. Currently it only check if its parent is a form.
User avatar
crispy68
 
 
Posts: 2913
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Sending email with a list

Post by crispy68 »

Hey Pablo,

I was able to recreate the form without using nested grids and used a grid with custom overflow. With this I was able get pretty close to how it looked. It seems to be working. The only thing I can say is it seems really slow in processing the form. I don't know if it is the host (GD) which I'm not a fan of or if there is something else making it process slow. Not sure where to look or what could possibly cause a slow submission. I'm sure it is on the server side versus the actual script.
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Sending email with a list

Post by Pablo »

I do think this is related to the script. If you take a look at the script then you will see it's very basic code.
Post Reply