How to create custom theme for Google Form? - html

I wanted an embed Google Form in my website so i grabbed embed code and pasted it in my page.
<iframe src="https://docs.google.com/forms/d/1u1NO8u4vu6Q9XuUNigo4qy22hjvRmL-HFIRVsgiaL9c/viewform?embedded=true" width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
(that's what Google gave me)
Everything is working fine BUT it's an iframe so I can't edit it's appearance using CSS. Google Docs' deafult themes don't match my site so I want to this page's CSS. I tried downloading https://docs.google.com/forms/d/1u1NO8u4vu6Q9XuUNigo4qy22hjvRmL-HFIRVsgiaL9c/viewform as html but this way I didn't get the css file. Do I have to create it by myself or there's another solution to my problem?

You can simply copy the form section of the html and copy paste to your page. It will post to google, and you still have full control over it.
You can't style it while it's an iframe.
see here for more tips about this:
http://morning.am/tutorials/how-to-style-google-forms/

You should use a <form> tag instead of embedding Google form. This is because the style from embedded form may not match your website scheme.
Here is how you can do it.
Create a Google Form.
Get the link and open the form in a new tab.
Create a barebone form having same items as the Google form.
Inspect Google form for action attribute.
a. Copy the same action to your form.
Inspect and find values for attributes name in the Google form.
a. Give the same name values for your form items as well. The values look like entry.742532386.
Check if your form gets the responses.
Read more here

Related

Embed Form from Planning Center to Wix

We are trying to embed a form from Planning Center People to our Wix website. The code given is not compatible with Wix and we keep getting a "parsing error unexpected token" message.
Here are the instructions from the PCP website:
Step 1: Include the ChurchCenterModal script tag on your webpage in the of your document:
Step 2: Add a link to your website (the location, name, and style is up to you):
" data-open-in-church-center-modal="true">Fill out our form!
Alternatively, if your website's content management system doesn't allow you to control the html of the link, you can also use a parameter in the URL itself:
?open-in-church-center-modal=true">Fill out our form!
Bob:
I think you need to do two things on your Wix site.
You need to add the code that is required in the header section of your page
Step 1: Include the ChurchCenterModal script tag on your webpage in
the of your document:
You do this in your site dashboard->settings->tracking tools and analytics page. Just cut and paste the code in a head section after click Add Tool.
You need to use the alternate link method for getting the form
Alternatively, if your website's content management system doesn't
allow you to control the html of the link, you can also use a
parameter in the URL itself:
Give
online
To use this you should add a button on your page and create an onClick handler that calls wix-fetch. Using the URL only not the rest of the HTML.
Should look something like this:
export function button1_click(event) {
//Add your code for this event here:
fetch("https://<your subdomain>.churchcenter.com/giving?open-in-
church-center-modal=true");
}
Hope that helps.
Steve

How to make a Link inside an iframe open in new tab

so I have a web page I've been working on that uses embedded Google Docs in an iFrame to keep it updated without having to hard code notices/updates.
I came across a problem, where if you were to click on a link it opens in the iframe instead of opening in a new tab, which is preferable. I've tried things like:
<base target="_blank" />
Any ideas on how to accomplish this? (Note that with Google docs I can't find a way to change the way links are handled, so I'd need to do that on the end of the main page.)

Google form doesn't load in iframe in html

I'm using <iframe> in HTML5 which is working correctly for all other links except google forms. Please tell me where I am wrong. Here is the link where I'm using:
http://www.sciencekidunya.com/event
and the google form link is:
https://docs.google.com/forms/d/1ehENKS61N8rmXHxvIk7A8l0ocKBTpjgN4zpY-VDqJXs/viewform
and the code is:
<body>
<center><img src="banner.jpg" width="100%" height="40%"><br><br>
<iframe src="https://docs.google.com/forms/d/1ehENKS61N8rmXHxvIk7A8l0ocKBTpjgN4zpY-VDqJXs/viewform"></iframe>
</center></body>
In some cases, the form may not be visible to other people until you change its visibility settings.
To do that:
Go to the "Settings" tab.
Click the dropdown arrow to the right of "Responses".
Uncheck the "Restrict to users in (your organization) and its trusted organizations" checkbox.
Your iframe should now load correctly.

GAS & HtmlService embedded in google site href management

I'm working on a Google Site:
An input page uses HtmlService with a form that fills a line in a spreadsheet.
An edit page shows the data with handsometable gadget.
In every handsometable's line, there is a link to edit some information using the same script of the input page.
All works fine, but I have some problems after submit.
In the input page it's ok, with this code
new input
The href is filled with the script url, clicking the link I go to input page.
In the edit page I'd like to go back to the page with the table, with this code:
table
but using the link I open the Google site in a frame into the page..
can i do something?
Thanks
Marco
Hope this image better explain the question...
some snapshoots http://imagizer.imageshack.us/a/img537/3748/OUzFV1.jpg

How to make a search box search google with HTML?

Lately, I've been working on a page in html which is supposed to search Google. I have a search box and a button but I'm wondering what the most efficient way to get the results from Google and display them on my page. If anyone knows I'd be glad if they helped me out.
{EDIT}
This is just a little project I'm working on. To be more specific I'd like to make it where what is typed in the search box gets taken from www.google.com/search and then the results of the Google search are displayed below.
Answer & Demo
You can create a custom google search engine for your sites, follow the steps, then get the code and paste it in a div inside the body tag. Here is a JSFiddle with an example of this (site:stackoverflow.com).
You can then edit the way the engine looks in the look and feel tab in the edit search menu.
Hope this helps, good luck! :)
So you're saying you want an HTML page with a single input and a submit button.
When the user enters text into the input and then presses submit what would you like to happen?
I see two basic approaches.
Pass the search string as a parameter in the URL so the next page can be made aware of it using javascript. then use xmlhttprequest to grab the data from google and do a document.write to render the information to the user:
example
Insert a Div with some id in the page and then use the submit's onclick attribute to initiate an AJAX call that gets the data from google and then inserts it into the div's innerHTML without the need for multiple pages.
[UPDATE}
after looking into this it seems that XMLHttpRequest will not work with google and that the API is the way to go.
source