free form to email: unlimited by mailjol
How to supply the form recipients dynamically?
By: admin
at: 07-03-2009 06:20am
This is a very advanced feature and is only available to PLUS members.

You can include a hidden/visible field "afm_form_recipients" in your form and supply its value as comma or space separated email address hashes. The 8 character hash of a email address is shown in brackets in front of an email address in your allForms address book. For example if your allForms addressbook lists addresses like: (0ec970b1) (0ff85e1e) (f2f8da7c)

And you want the form to send its data to &, you can include a hidden form field as:

<input type="hidden" name="afm_form_recipients" value="0ec970b1, f2f8da7c">

Alternatively the same can be achieved using a drop down if you want to let the submitter decide where the form goes:

<select size="1" name="afm_form_recipients">
<option value="0ec970b1">ABC</option>
<option value="0ff85e1e">PQR</option>
<option value="0ec970b1, f2f8da7c">ABC and XYZ</option>

If you already have 4 or more email addresses selected in the settings of a form, supplying more using the codes given above will have no impact. Similarily if you have 2 email addresses selected in the form settings and you provide 3 more addresses using this method, only the first 2 will be taken making a total of 4 (maximum).

By: Shane
at: 08-03-2009 02:29am
I have a couple questions regarding this feature:

(1) Is it okay to have no email addresses selected in the settings of your form, allowing the user to have total control over where the form is sent?

(2) As long as no more than 4 email addresses are designated for one particular option on your drop down menu, is it okay to have say up to 20 different options for the user?

Thanks for you help!
By: admin
at: 08-03-2009 03:13pm
(1) Yes you can omit email addresses in the form settings and supply them using this field. But all email hashes must be of addresses which are already present in your allForms addressbook. The system will discard those hashes which are not there in your address book.

(2) Yes 20 or 200, you can put as many options you want in a drop down menu. Even if you supply more than 4 hashes in the value of a particular option, only the first four valid ones will be taken by the system (if there are zero already selected in form settings).

By: Shane
at: 11-03-2009 03:25pm
Thank you so much for your information about this feature. It has made my form much easier to set up the way I intended. I have tested out the form and everything seems to working flawlessly.

There was one thing I did notice however. In the Form Submissions Database Viewer where I view the stored submissions for the form, the "afm_form_recipients" form field information is not included, so I have no way of knowing which value the user selected. Is there something I need to do in the form setup to make this field show up? (My "afm_form_recipients" is setup as a drop down)
By: admin
at: 11-03-2009 03:39pm
As "afm_form_recipients" is a system field and has a special meaning, allForms does not store it with the user data. If you want it with the form submissions for some reason, you need to copy its value to some other hidden/visible field in your form statically or using javascript (dynamically).

By: Kathy Davies
at: 02-08-2010 01:10pm
I've added the code listed above (the afm_form_recipient option) and am not getting the email from the address that is selected. I'm probably leaving out a step, but I'm not sure what that step is. The form is at
By: admin
at: 02-08-2010 01:20pm
You have to put the 8 character hashes of email addresses as the values of options and not the actual email addresses. Putting the actual email address in the source of your form is a open invitation to spammers. The hashes of a particular email address is shown besides it in your allForms email address book.

By: Kathy Davies
at: 03-08-2010 06:42pm
Thank you. I am a little confused on the number of email addresses that can be in the form. Are you saying that only 4 emails will be sent per form and one or more of those can be from the drop down list? Or are you saying that the system will only 'see' the first 4 emails listed, regardless of which ones have been selected. (Seems like a silly question now that I've typed it out, but I'm gonna ask, anyway.)
By: admin
at: 04-08-2010 01:27pm
No matter how many you have in your list and how many you select, the system will email the form to 4 email addresses only. While selecting those 4 addresses, first priority is given to those present in your form settings on allForms.

By: Kathy Davies
at: 04-08-2010 01:29pm
Thank you for the clarification. I really appreciate the quick response and great service here!
By: GeorgeP
at: 26-08-2010 06:31pm
Hello, I'm trying to use this advance feature but it doesn't seem to work for me. Let me tell you what I've done in case something is wrong:

My form is c52c7ac0 and the field for the sender to select an email recipient is:

<td align="left" valign="middle"><select style="font-family: Verdana; font-size: 11px" size="1" name="afm_form_recipients"><option value="" selected>Select a department</option>
<option value="8ffd861b">General Information</option>
<option value="1f6b313a">Customer Service</option>
<option value="ca56827a">Sales</option>
<option value="780410f5">Support</option>

with the values in the 4 options being the email addresses I want the form to be sent to. However, when the form is completed and Submit is pressed, I get an error message to the effect that one of the required fields is not completed.

The actual form can be seen and tested here:

I suspect that it should be something simple but I can't find what although I tried many variations. Any help will be really appreciated with my thanks in advance.
By: admin
at: 27-08-2010 03:50am
You have used the field afm_form_recipients as a normal question inside Easy Form Creator. But its a special field name. Although you can continue to use it like that way but you cannot mark it as required as the validation is not performed on special fields.

By: GeorgeP
at: 27-08-2010 09:44am
I see what you mean, but can't get it to work as intended. What I'm trying to achieve is to get an email to the address selected by the sender and the sender get an email from the address selected. To make it simple: if the sender selects to contact Sales, I should get an email addressed to sales@... and the sender should get an auto reply from sales@...

I made the field afm_form_recipients not required and what happens is:

No selection made: mail sent by the system to contact@...
General Information selected: mail sent by the system to contact@... and info@... twice
Customer Service selected: mail sent by the system to contact@... and customerservice@... twice
Sales selected: mail sent by the system to contact@... and sales@... twice
Support selected: mail sent by the system to contact@... and support@... twice

The address contact@... is the default email address checked at the time of form creation and, as I understand, an email is sent to it by the system regrdless of the selection made by the sender. As a result, the department selected (if selected), is added as an extra address and results in duplicate emails sent.

Next I did, was to uncheck the contact@... as a default address from form creation. This seems better in that the system email is sent once to the correct address (for example sales@...) and, when I reply to the message, the reply comes from that address as desired. The only problem is that, if no selection is made, no email is received because there is no default address like the contact@... as previously.

I'm thinking along the lines of

1) marking the field as not required
2) leaving the default contact@... unchecked
3) making one of the four selections default

In that case, if no selection was made, the afm_form_recipients field would have the default value and an email would be received in any case and only once.

I will search in the FAQ section on how to give a default value to the field unless it's easy for you to explain it here. But, I would appreciate your opinion as to whether my intended action is correct or not. For your information, I have not yet designed an HTML auto-responder for this form but I will as soon as its functioning is set correctly. When I do, can I use the %afm_form_recipients% dynamically in the form, in the same sense that %name% and other fields are used?

I hope that I have described the situation correctly, although some times it's easier to do something than it is to describe it. Thank you for the quick response to my previous post and hope to get a reply again. As we are in different time zones, that may take a few hours.
By: GeorgeP
at: 27-08-2010 12:42pm
I think I have solved the issue by changing the drop down box to radio buttons with the first of them pre-selected by default. I used the following code for two cells of two selections each in a table:

<td align="left" valign="middle" width="30%">
<ul style="margin: 0px; margin-top: 2px; padding: 0px; list-style: none; font-weight: normal;">
<li style="margin: 0px; padding: 0px; list-style: none; font-weight: normal;">
<input type="radio" name="afm_form_recipients" value="8ffd861b" checked>General information<br>
<input type="radio" name="afm_form_recipients" value="1f6b313a">Customer service</li>
<td align="left" valign="middle" width="50%">
<input type="radio" name="afm_form_recipients" value="ca56827a">Sales<br>
<input type="radio" name="afm_form_recipients" value="780410f5">Support

If the sender leaves the pre-selected button unchanged, the email comes to the info@... address and, making any other selection, sends the email to the proper address.

Coming back to my previous post, I'm happy that it now works but still need a reply if I can use %afm_form_recipients% in the auto-responder.
By: admin
at: 27-08-2010 12:47pm
Do you wish to use the hash value of afm_form_recipients or the actual email address it represents?

By: GeorgeP
at: 27-08-2010 01:07pm
I'll try to explain what I want to do:

There is one form and there can be one auto-responder as I understand it. Ideally, I would want the auto-responder to originate from the email address attached to the selection made by the sender (for example from sales@... or from support@...) and have a text reading something like "thank you for contacting our xxxxx department ..." with xxxxx being the selection text. If this cannot be done, it could say ""thank you for your email sent to xxxx@..." with xxxx@... being the email address corresponding to the selection at time of submission.

Is something like this possible, or you may perhaps have a better idea?
By: admin
at: 29-08-2010 03:26am
Well its not possible to re-use the value of this variable in message templates at present but i have forwarded this thread to our dev team for a review. A update shall be posted soon.

By: GeorgeP
at: 28-09-2010 09:27pm

As one month has passed since the previous post, may I ask if there has been any development on this issue? Many thanks in advance.
By: admin
at: 30-09-2010 05:45am
We do have this in our "To-do" list but it hasn't been implemented yet as this was put on low priority due to some other more important issues coming up requiring attention of our dev team. Please stay assured that an update shall be posted to this topic as soon as something related to this gets implements. I have again reminded them about it.

By: GeorgeP
at: 30-09-2010 07:03am
Thank you, I just thought that it was forgotten. I'll be watching for updates to this post and my previous experience tells that you always find solutions.
By: admin
at: 02-10-2010 04:12am
You can now use the %_recipients_% variable which will display the comma separated email addresses of all form recipients (static: supplied in settings + dynamic). I hope this resolves the issue for you.

By: GeorgeP
at: 05-10-2010 06:02pm
Thank you for looking into this and apologies for the delayed reply.

Unfortunately I can't make it work, perhaps I'm doing something wrong. My form is c52c7ac0 and it's live and working at where you may try it and see what happens.

I do receive the allForms at the correct email address as selected by the person completing the form and that was also the case before the recent change you made as above. The problem is with the auto responder: I have tried using the following in the "from" box of the "thank you" email: (as per your reply above)

but the email received by the form submitter just shows that it originates from:

not from sales@... or customerservice@... etc.

Is there anything I'm missing or doing wrong? It might be easier if you used the actual form on my site and see what happens.

Thank you in advance for any assistance you can provide and best regards,

By: admin
at: 05-10-2010 06:11pm
"From" address is not dynamic. It can only be supplied in settings. You can include some reference of the "dynamic from" in your message or subject using the %_recipients_% variable.

By: GeorgeP
at: 05-10-2010 06:31pm
Thanks again for the quick reply. What I understand from it is that I should enter a full email address in the "from" field of the auto responder and say something like: "your message to our %_recipients_% department was received...." in the subject or body of the auto responder email.

Is that correct and should it be %_recipients_% or %afm_form_recipients% which is the field name in the form?
By: admin
at: 05-10-2010 06:33pm
Its %_recipients_%.

You can use it in subject and body of your auto-responder email.

By: GeorgeP
at: 05-10-2010 06:36pm
OK understood and will be implemented. If you don't hear from me again, it will mean that everything works fine. Cheers and have a nice evening.
By: Suleman Junrop
at: 12-01-2011 07:18pm
How do i receive my form in my email ? I have tried several times but to avail. what code do i need to insert in my form? I am a free user. Please get back to me soon.
By: admin
at: 12-01-2011 08:49pm
@Suleman What is the http:// URL of your form?

By: Kevin
at: 02-11-2014 10:28pm
I have a new form that uses a drop down box to let the submitter choose where to send the form. It works perfectly. I am just wondering if the emailed form can show the text of the option they selected (not the hash or email address, but the text option).

My form is located at and the field label is "Chapter" (and of course the field name is afm_form_recipients).

For example, if the user chooses "Achim AZA #1016" the email will be sent correctly using the hash of that option, but how do I get the text "Achim AZA #1016" to be included in the form email?

Your Name: *
Your Email (not shown): *
Your Message: ( Please include the URL of your form if your query is form related )
Designed & Maintained By:- Web Services © 2024