I have a website with a link that says "Click here to claim your prize" and that link goes to a Sales Force catch all web-to-lead form (that multiple sites use and it has a site ID that I append to the URL so the data goes to the right account)
When a user clicks that link and goes to the form page a string (in this case it's the promo code "my prize") needs to be passed to that form page and placed in the comments form field.
My questions are how is this done, are there any tutorials you could point me to, and is there a better method for accomplishing this?
What I'm trying to avoid is having the link say "Click here to win a free prize! Must enter "My Prize" in the comments" and having the user manually enter the promo code.
Thanks muchly in advance for your help!
I've used a handy jQuery script in the past called preset.js, although the instructions are not that great it's fairly simple to implement, you may have to pick through his source code though.
This question may be better on stack overflow but I found this blog post which shows example code using php and cURL to post to the web-to-lead form
http://www.paulwest.co.uk/article.php/salesforce-form-integration-with-php
This is another post about pushing leads to salesforce with php
http://sim.plified.com/2009/02/13/pushing-leads-to-salesforce-with-php/
And one more for good luck
http://www.seobywebmechanix.com/salesforce-php-form-processor-curl-tutorial
Hope these help
Related
Hello,
I use a form on my website. This form contains content that can only be selected once.
I would like to create some sort of "queue" when there is more than one visitor on the page.
So for example 2 visitors:
visitor 1 -> fill in the form.
visitor 2 -> gets popup with "please wait"
visitor 1 -> sends the form.
system processes data from form.
visitor 2 -> make popup invisible and show form.
Or another option would be to check if someone else has checked the checkbox yet and give a message if someone has checked this yet.
Well, as you didn't provide any code I will just give you my humble thoughts on this.
First of all: May I ask why? This sounds like a horrible user experience...
If you really want to do it anyways, here's what you need: AJAX or jQuery to provide the live feedback popup you mentioned. For the visitor count caching part there are obviously many ways to do it like using scripts of any kind or even some file or database based solution. From that point on you just go with your favorite web language and code the main queue logic, I would recommend PHP with a breeze of JavaScript.
I hope this was at least a little bit helpful.
Kind regards
I have one short question for a hrev link in moodle mail template. When you are subscript to some forum, moodle start to send you a emails from every replay with content where you also have a href links. How can I add same variable in a href link in moodle mail. Explanation, if I reply to some forum , I received email where I have link http://moodle.com/mod/forum/discuss.php?d=132 , now can I add new variable to link and when I will received mail to have link something like this: http://moodle.com/mod/forum/discuss.php?d=132&varialbe=germany&variable2=eu
Note:moodle send email when is activate cron.php script, not when submit replay in replay form.
I hope someone before me already have this issue or have some idea how to find solution, I will really appreciate if He/She want to share with me.
Best Regards,
J.J.
The code is in
/mod/forum/lib.php
Look for the functions
forum_make_mail_text()
and
forum_make_mail_html()
then look for
forum/discuss.php
in the code.
You can add extra parameters there, good luck! :)
Hello fellow community members,
I was unable to find a helpful answer, so I will give this a try: I recently developed a website that has a FB "Recommend" (same as "Like") button implemented. I have never dealt with this before, hence my complete lack of knowledge.
Now, I implemented the code the FB developer's Like page (--> http://developers.facebook.com/docs/reference/plugins/like/) creates correctly into the website (both the script and the DIV-tag, yet something that is not automatically generated seems to be missing and needs to be added for the button to work correctly. It currently does not post to the FB wall.
Upon doing a debugging check, I received the following results: [...]
Unfortunately, I have no clue what to do with that data. How and where exactly in the HTML code do I implement those missing TAGS and PROPERTIES? Any help would be highly appreciated...
Kind regards & many thanks in advance, :-)
Doc
It looks like you're missing the Open Graph meta tags. Those go into the head of your page.
Facebook has a generator to help you create the tags, but you'll need to add them into your markup.
I want to set up a login page in which from anywhere on the site I can send a user to it and it will display a custom message along with it. I could use a redirect and a msg query param but is this the best way to do it?
I'm working with node.js but I'm interested in a universal solution.
If you are going for easy, you can just have GET data in the URL. But, that doesn't look that nice, if you want a rather long message, plus, GET has size restrictions, where POST (virtually) hasn't.
For using post data you could use the solution of this: JavaScript post request like a form submit question, but that gives a rather messy source code (if you want a somewhat longer text).
You could keep them in a database, and only send the ID of the message to a PHP page, and get it from the database (that's what I would do, but that doesn't mean it's a good idea, just amateur here!)
You can use jQuery or simply plain javascript to extract your message from the url; the relevant question that listed links to detailed code: jquery get querystring from URL.
Then depending on how you want it displayed, apply the extracted string to your situation.
When you share something on Facebook or Digg, it generates some summary of the page. How would I do this in Perl? What algorithms are there?
For example:
If I go to Facebook and tried to share this question as a link:
How can I create a website summary with Perl?
It retrieves "Facebook/Digg get website summary? - Stack Overflow" as the title (which is just the title of the page) and [... incomplete question?]
CPAN is your friend.
Some promising looking modules:
HTML::Summary
HTML::SummaryBasic
Lingua::EN::Summarize
Assuming you mean sharing a link...
Usually the summary is written by the user submitting the URL. If you have to write a summary automagically this can be achieved by:
Using the first 100 or so characters of the document body (in itself not easy)
Using metadata like the description or keywords (often empty or spammed)
Context-relevant summaries like recreating Google snippets (sorry its PHP but simple)
Tags/keywords from the document using something like the Yahoo Keyword Extractor API or your own keyword density function
Your best bet is to ask the user!
Hope that helps somewhat :)
Basically you want to scrape the URL and find the "most significant paragraph" which might be the first <div> or <p> element after the first <h2> or <h1>, depending on the layout of the page.
You could check and see if there is a meta description on the page, but that leaves you at the mercy of whoever wrote the meta description.