Have a Google Form set the title to the users email - javascript

I'd like to make a Google Form that I can email to multiple people and when they open the form to fill it out, the title will be replaced with their email.
I've tried the onOpen() trigger and from what I understand it doesn't act the way its name suggests.
Is there a way to do this?
Thank you so much!
Ben

onOpen triggers when the form is opened for editing by the developer (you), not for submission by the end users (see this question).
I don't know of a way to do what you want. The closest I can think of is using apps script to generate the same form over and over again from a list of email addresses. But then you'd have to send a different form to each person, which I'm guessing isn't going to work for you.

Related

Provide data such as holder name or address to PayPal JavaScript SDK

I am using the PayPal JavaScript SDK as described on https://developer.paypal.com/docs/checkout/
As you can see on this page, there is a "Try the buttons" header and a "MasterCard" logo for example. If you click on "MasterCard" a window pops up, where the user can provide his name, address an so on, see image:
I already have all this data from my customer and want to pass it to PayPal, so the form is pre-filled. I know, the user could change the values in the pop-up, but this is OK.
Unfortunately, I did not see any params/methods to provide this information to PayPal. But this must be possible, right?
Please help! :-)
Thank you,
schube
Yes, this is possible. Follow these links for further information.
https://developer.paypal.com/docs/checkout/integration-features/update-order-details/#
https://developer.paypal.com/docs/api/orders/v2/#orders_patch
Finally, I got (most) of it working (thanks to the pointer of Vikramjit).
The telephone number is still a problem, but I do not need it.
Here is a working example: https://gist.github.com/schube/84811d3a6520bbec5563673730c2440f and here is "playground" for easy experiments: https://developer.paypal.com/demo/checkout/#/pattern/client

Is it possible to "pseudo fulfill" the LinkedIn add to profile button?

It seems LinkedIn has changed the previous autofulfill button.
https://addtoprofile.linkedin.com/
My question is. Is it possible, with JavaScript or somehow to fill the form fields with the information so the user can check the info and make the final click?
In my case, I need to add certifications.

How is this JavaScript working in an email received from Google

I received an email in my Gmail account from Google about people I might know on Google+ which contained running JavaScript with hover effects etc, at least I assume it was JavaScript, HTML5 maybe??... See below screenshot:
As you can see (kind of) is when I hovered over the ADD TO CIRCLES button, a new window slid open asking me to select a category for that person. When I ticked a category, it added a Tag with that category next to the persons name.
I have never seen an email with dynamic content like this, and I am guessing the obvious answer the email was from Google being displayed on they own email service so they can do what they like. But I would be interested in how they achieved this and could we take advantage of it in some way?

Automatically refresh SharePoint site when item is added to a Form Library

I have a question about automatically refreshing a SharePoint form library any time an item is added to it. We have a business team within our company where any individual on the team can fill out a particular InfoPath form. Once that form is filled out and submitted, it is saved to the aforementioned SharePoint form library.
When any user submits a form like this, the other users like to know that it has happened and they almost always have their browsers open and pointed to this particular SharePoint form library. These form submissions and the data they contain are somewhat time-critical, so it's an important way for everyone on the team to be up-to-date about the submitted information.
Does anyone know if such a workflow is possible in InfoPath? I've Googled this issue already and I've found a lot of helpful advice about redirecting to the same page using the SPUtility class's functionality (which does seem to work), but I want to refresh/redirect the entire page, not just the pop-up window for which the SPUtility class is apparently responsible. I've also seen some results suggest using a Content Editor web part containing some JavaScript for refreshing the page and then accessing that Content Editor via a workflow or event receiver. Does anyone have any experience solving an issue like this or have some ideas? I'm not looking for anyone to write the solution for me - I just need a push in the right direction from someone that's more experienced with SharePoint.
Thanks!
I would suggest a bit of JavaScript that periodically redirects the page to itself. If you wanted to get flashy, you could use the Client Object Model to query the list for the last modified date of the last modified item. If that changes, refresh, or you could use the Notifications API to show a nice 'Notification', perhaps with a refresh button that reloads the page?

How to set up Google Analytics goal tracking of a contact form with no separate thank you page?

How do I set Google Analytics up to track visitors to my website who have submitted a contact form, that doesn't have a separate thank-you url?
Ive seen the code posted around blogs and GA help forums but so far have yet to come across how would I actually set the goal up in order to insert the snippet of code.
Code found on forums and such:
onsubmit="pageTracker._trackPageview('/Goa1-Button'); pageTracker._trackEvent('Goals','CLick-Button');"
Specifically, I would like to know things such as:
What goal type would I use?
If i named the campaign Contact form completions, where would it go and fit in to the code above?
Is the code above right and will it help me?
Any other advice, any one ever had to do this before?
So it looks like from the URL you posted in a comment on yahelc's answer, that you have a form that submits and gives back a response via AJAX.
Also, your on-page GA code is the async version, but the code you have in your question is the traditional, so you need to use the async syntax.
On your page, if the visitor does not fill something out, the area in question gets highlighted in red (sidenote: I see no "you need to fill this out" or "this is the correct format" messages if I do not fill out the form correctly..you should look into adding that...).
The main thing you need to make sure is that you only pop the 'success' code if the visitor successfully fills out the form. So you don't really want to attach the GA code to the onsubmit because this can produce false positives..it will trigger whenever the visitor clicks the submit button, regardless of whether or not they successfully filled out the form.
So it looks like the javascript that handles form validation is in your /custom.js, and you have on line 163 of custom.js viewsource the following:
success: function(response){
jQuery(".ajax_form").before("<div class='ajaxresponse' style='display: none;'></div>");
jQuery(".ajaxresponse").html(response).slideDown(400);
jQuery(".ajax_form #send").fadeIn(400);
jQuery(".ajax_form input, .ajax_form textarea, .ajax_form radio, .ajax_form select").val("");
}
});
This looks to be where the "thank you" message is displayed, after the form has been validated and submitted, so you should put your GA "success" code somewhere in this function.
The code you will want to insert should look something like this (based on the code in your question):
_gaq.push(['_trackEvent', 'Goals', 'CLick-Button']);
_gaq.push(['_trackPageview','/Goa1-Button']);
NOTE: For the event tracking, this will set the event category to "Goals" and the event action to "CLick-Button". There are other optional arguments you can pass to the _trackEvent for further granularity. Refer to GA's event tracker guide for more details.
As for the goal tracking, as yahelc mentioned, this is setup within the interface. The code above will send a virtual page view with a page name of "/Goa1-Button" and you will use this value in setting up your goal. There are a lot of ways you can set it up the goal. You can make it exactly match that value or start with that value if you anticipate URL params being added to it later, etc...(but also note, you cannot currently create goals based on events...which is lame, but I hear GA is working on making that happen eventually).
edit: Apparently you actually can set goals based on events, if you use the "New Version", as mentioned by yahelc in his answer comments. Nice!
Goals are configured from within the Google Analytics interface, and do not apply retroactively.
You should check out How do I set up goals and funnels?
You can specify a specific page, event or amount of time on site as your goal.
As far as how to configure the code that will track submission of your form, that requires more information (i.e. code samples) to help you with. But, most importantly: Is it an AJAX form, or a regular form that just posts to the same URL? Are you using async or traditional Google Analytics syntax?
EDIT:
Based on the form you just posted, it looks like its an AJAX POST that returns an HTML body.
So, all you need to do is add your "goal" code into that markup, something like:
<script>
_gaq.push(["_trackPageview", "/contact-us"]); //for a URL goal
_gaq.push(["_trackEvent", "Contact Us", "Submit"]); //for an event goal.
</script>

Categories