Back to myContactForm.com - Easy email form creation and processing for your web site
myContactForm.com - Help Forum Forum Index myContactForm.com - Help Forum
Have a question that you need answered about myContactForm.com? Post it on this message board but first search this forum and read out FAQ to ensure it has not already been answered. This is not a board to post links to your site! SPAM will be deleted!
 
   Search MessagesSearch Messages
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Subject Line from URL

 
Post new topic   Reply to topic    myContactForm.com - Help Forum Forum Index -> Everything Else
View previous topic :: View next topic  
Author Message
puddlez



Joined: 18 Feb 2010
Posts: 9

PostPosted: Sat Mar 03, 2012 1:51 pm    Post subject: Subject Line from URL Reply with quote

Not sure if this is an option, but I have a client asking... Is there any way to customize the subject line of the form such that the subject line is captured based on the url of the page?

Example:

1. Visitor goes to amazon.com
2. Visitor views product x: amazon.com/x
3. Visitor clicks a request info button that loads your form (set up like this now)
4. The form prepopulates the subject line to say: product x

If adding that sort of script to the fixed subject option would break how the form is intended to work, are you (or anyone else here) open to throwing a quote for a customization? This client has a ton of products and will only actually sell a handful. The rest are quote based. Their cart was customized to address that, but other within cart php alternative form attempts did not work so well. This one is very consistent. Due to the large quantity of quote requests they just need this piece for easier management.

Thanks!!
Back to top
View user's profile
mycontac
Site Admin


Joined: 31 Dec 2003
Posts: 2860

PostPosted: Sat Mar 03, 2012 2:15 pm    Post subject: Reply Reply with quote

If you set up the form with a fixed subject, you will see the following:

Code:
<input name="subject" type="hidden" id="subject" value="Web Feedback" />


You can use Javascript or a server side script (like PHP, ASP, etc.) to pre-populate the value="" portion of the above code based off of the URL of the page. This would be fairly easy, but would depend on what technology is available for your use.

Nick Ladd
myContactForm.com
Back to top
View user's profile
puddlez



Joined: 18 Feb 2010
Posts: 9

PostPosted: Sat Mar 03, 2012 2:37 pm    Post subject: You Rock Reply with quote

Thank You!!
Back to top
View user's profile
puddlez



Joined: 18 Feb 2010
Posts: 9

PostPosted: Wed Mar 07, 2012 6:41 pm    Post subject: Reply with quote

Hi Nick,

I used the value of the subject to test quite a few really simple javascripts like this one:

Code:

<script type="text/javascript">
<!--
  document.write("This page is located at: "+document.URL);
// -->
</script>

Once uploaded, the form displays as expected, the url displays with no errors, but the subject gets stripped. I should have expected that because of email clients.

I tried a few different approaches using a text field in the form itself as well. No dice. What are the odds that the folks there will allow these kinds of customizations to be done even if there is an extra fee or an approval process for security purposes?

Thanks
Julie
Back to top
View user's profile
mycontac
Site Admin


Joined: 31 Dec 2003
Posts: 2860

PostPosted: Thu Mar 08, 2012 5:58 am    Post subject: Reply with quote

puddlez wrote:
Hi Nick,

I used the value of the subject to test quite a few really simple javascripts like this one:

Code:

<script type="text/javascript">
<!--
  document.write("This page is located at: "+document.URL);
// -->
</script>

Once uploaded, the form displays as expected, the url displays with no errors, but the subject gets stripped. I should have expected that because of email clients.

I tried a few different approaches using a text field in the form itself as well. No dice. What are the odds that the folks there will allow these kinds of customizations to be done even if there is an extra fee or an approval process for security purposes?

Thanks
Julie


I am not 100% sure of the Javascript that you are posting. I don't see the part where it is writing the dynamic subject value to the form element that contains the subject value being posted. I am sure it can be done, but it falls outside the scope of our support.

At this point, this isn't something that we'll likely integrate into the broader service.

Nick Ladd
myContactForm.com
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    myContactForm.com - Help Forum Forum Index -> Everything Else All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.11 © 2001, 2002 phpBB Group