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
Custom Code for TO: Field
Started 12 years ago by Nicholas1127 | 6 posts |
-
Hi. I'd like to put this standard Machform embed code onto my current dynamic php page but with one change:
Current embed code:
< i-frame height="628" allowTransparency="true" frameborder="0" scrolling="no" style="width:100%;border:none" src="htp://mywebsite.com/machform/embed.php?id=18031" title="Job Submission">Job Submission< /i-frame>
My requested code:
< i-frame height="628" allowTransparency="true" frameborder="0" scrolling="no" style="width:100%;border:none" src="htp://mywebsite.com/machform/embed.php?id=18031&to_email=john@website.com" title="Job Submission">Job Submission< /i-frame>You'll notice I added &to_email=john@website.com to the end of the URL
The email address "john@website.com" is pulled into this .php page dynamically and assigned to to_email.
Can I somehow use this $_Get value and pass it into the machform system, so that when the email gets sent upon form submission, the value of to_email is put into the TO: field of the email.
The form is created in Machform, and in the email-to field, I'm putting admin@mywebsite.com. I want to instead have this form be sent to to_email instead.
Is this possible? Anyone have any solutions? Or a programmer out there I can pay to alter the machform script. I love machform and really want to use it for this process. Rather than have completely custom program send out a form like this, I'd rather customize Mach form.
Thanks for your help.
Nick
Posted 12 years ago # -
It is possible to do so using this method:
http://www.appnitro.com/doc-url-parametersYou can use it to populate an email field and set the field as hidden by adding "hidden" keyword into the Custom CSS Class property of that field.
You can then configure your form to send the result of the form to that field.MachForm Founder
Posted 12 years ago # -
Hi Yuniar,
Thank you for your response. I'm trying to do this programming like you pointed out above, but it doesn't seem to work just right. Any suggestions on how to get the TO: email to read the form's field "mach_email" and the subject to include "mach_title" ({element_2}) in the subject line?
I've set in the mach form:
mach_email is element_1 and is hidden
mach_title is element_2 and is hidden.The form pulls up fine on my page. See the link above, and I included two $_GET paramaters:
&mach_email=Nicholas1127@hotmail.com
&mach_title=mytitleThe mach form was set up so that the subject line is {element_2} - {element_3}
element_3 is coming thru fine in the subject line, but the form isn't reading the mach_title variable to put it into the subject line at {element_2}Also, how to I get the program to read the &mach_email=??? and put that into the TO: field and send?
Thanks,
NickP.S. Currently the form is embeded using the PHP embed code, but I also tried the iframe and that didn't seem to work either, as I don't think the $_GET variables were being able to be read in the iframe. Thanks.
Posted 12 years ago # -
Hi Yuniar,
OK. Update on my last post so you don't waste your time.
I figured out how to populate the two hidden form fields, using PHP and adding &element_1=XXXX&element_2=XXXX to the end of the iFRAME Source URL. SO now the form populates and the info gets submitted. Even the subject line gets the proper info.The only part I can't figure out is how to get that element_1 (which is an email address) to be the TO: email address for the machform send. Any ideas?
Thanks,
NickPosted 12 years ago # -
Also: The program doesn't want to allow putting {element_1} into the "Your Email Address" field when setting up the email for this form. That's why I seem to have problems. Can I alter in the code somewhere?
Posted 12 years ago # -
Hi Yuniar,
Well, I found a work-around to the problem. The email that gets sent won't allow me to populate the TO: field with a tag {element_1}. And so, I sent the customer receipt email to {element_1} because it allows me to set that TO: email to {element_1}.
This will work for me.
Thanks. All solved at this time. Unless you know another way to do this.
Thanks,
NickPosted 12 years ago #
Reply
You must log in to post.