This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Email from Dropdown - V.3
Started 12 years ago by got2know | 5 posts |
-
Can you tell me if the hack for the email dropdown in V.2 will work in V.3. And/Or is there now a better way:
Hack from V.2 - http://www.appnitro.com/forums/topic/email-from-a-drop-downlist?replies=49
Thanks!
Posted 12 years ago # -
Further to my original post, I did find a possible partial solution. It could be helpful for many trying to do this. However, I'm not sure if this will continue to be a valid workaround.
This following technique seems to work:
In the "Email Settings -> Send Notification Emails to My Inbox -> Your Email Address"
... it seems that I am allowed to populate that with a variable (e.g. {element_7} )
My element_7 variable is pulling its result from a dropdown field that has valid email addresses as choices. Upon submitting the form, the notification email successfully sends out to the email address specified in the User's choice from that dropdown field. So all is good.
2 things:
1) This won't solve the issue where you want to choose a name (e.g. Joe Smith), and that name is somehow connected to a email address. Which is what I'd ideally like to do.
2) The Help file for the Email Template Variable says "Where can I use it? You can insert template variable into Email Subject and Email Content."
Since it doesn't specifically say that you can use the variable in the "Your Email Address" field - I worry a little that future releases might change the code in a way that stops this work around from working.Thanks!
Posted 12 years ago # -
There will be an easy option to do this within v3.2 (soon the be released), so that you will only need to edit one file and put some code similar as this:
$mf_hook_emails[3]['element_id'] = 5; $mf_hook_emails[3]['First option'] = 'email_1@example.com'; $mf_hook_emails[3]['Second option'] = 'email_2@example.com'; $mf_hook_emails[3]['Third option'] = 'email_3@example.com,email_4@example.com';
no further hacks needed other than that. This way, the email address can be associated with a name easily and it won't be displayed at all within your form.
If you really need it for your current version of MachForm (either 3.0 or 3.1) we can send you the modification to achieve this. It will still working fine when you update to v3.2 later.
Please contact us directly and we'll send you the files for these.
MachForm Founder
Posted 12 years ago # -
This is a welcome feature. It will solve a problem we are having converting a from a hand-coded form to a Machform version; currently we are using a crude workaround. Will this be applicable on a form-by-form basis, or will conditional code have to be added to restrict this to a specific form id, as usual?
Posted 12 years ago # -
No need to put any conditional code. The code above already contain the form_id (3 in this case).
If you need to apply it for another form, simply add another block of code similar as above, but change the index number, so it would be something like this:$mf_hook_emails[3]['element_id'] = 5; $mf_hook_emails[3]['First option'] = 'email_1@example.com'; $mf_hook_emails[3]['Second option'] = 'email_2@example.com'; $mf_hook_emails[3]['Third option'] = 'email_3@example.com,email_4@example.com'; $mf_hook_emails[4]['element_id'] = 8; $mf_hook_emails[4]['First option'] = 'email_1@example2.com'; $mf_hook_emails[4]['Second option'] = 'email_2@example2.com'; $mf_hook_emails[4]['Third option'] = 'email_3@example2.com';
I believe this is a lot easier and clean compared to the v2 hack.
MachForm Founder
Posted 12 years ago #
Reply
You must log in to post.