Create 'Contact Form' in Page

About how to add a contact form on the page and where the message goes

Mendapatkan ID Blog

Pada halaman dashboard Blogger silahkan lihat bagian address bar browser, Anda akan menemukan contoh url seperti di bawah ini:

https:/www.blogger.com/blog/posts/0000000000000000000

Bagian yang ditandai pada url di atas adalah ID blog Anda, silahkan salin ID tersebut terlebih dahulu karena akan dibutuhkan untuk mengaktifkan script ContactForm nantinya.

Membuat Halaman Baru

Kami asumsikan Anda sudah mengerti cara membuat halaman baru, hal selanjutnya yang perlu dilakukan adalah menggunakan template postingan yang sudah disediakan:

  1. Buka folder 'Post and Pages' dalam Google Drive,
  2. temukan file dengan nama Contact Form.txt
  3. salin semua kode yang ada,
  4. pada editor postingan Blogger, silahkan pindah ke mode HTML dengan cara klik icon lalu pilih Tampilan HTML
  5. Tempel semua kode yang sudah disalin tadi ke dalam postingan.

Agar halaman kontak-nya bekerja dengan baik, tambahkan ID blog serta url blog Anda pada script ContactForm-nya. Untuk memudahkan Anda, kami sudah menandai bagian mana yang harus diubah dari template postingannya:

<script>/*<![CDATA[*/ if (typeof(BLOG_attachCsiOnload) != 'undefined' && BLOG_attachCsiOnload != null) { window['blogger_templates_experiment_id'] = 'templatesV1';window['blogger_blog_id'] = '0000000000000000000';BLOG_attachCsiOnload(''); }_WidgetManager._Init('//www.blogger.com/rearrange?blogID\0000000000000000000','//www.yourDomain.com/','0000000000000000000'); _WidgetManager._RegisterWidget('_ContactFormView', new _WidgetInfo('ContactForm1', 'footer1', null, document.getElementById('ContactForm1'), {'contactFormMessageSendingMsg': 'Sending...', 'contactFormMessageSentMsg': 'Your message has been sent.', 'contactFormMessageNotSentMsg': 'Message could not be sent. Please try again later.', 'contactFormInvalidEmailMsg': 'A valid email address is required.', 'contactFormEmptyMessageMsg': 'Message field cannot be empty.', 'title': 'Contact Form', 'blogId': '0000000000000000000', ... /*]]>*/</script>
Keterangan
  • 0000000000000000000 — Ganti dengan ID blog Anda, terdapat kurang lebih 4 kode serupa dalam script di atas.
  • //www.yourDomain.com/ — Ganti dengan url blog Anda (tanpa http/https)
  • Sending... — Teks pemberitahuan saat sedang mengirim pesan (optional)
  • Your message has been sent. — Teks pemberitahuan pesan terkirim (optional)
  • Message could not be sent. Please try again later. — Teks pemberitahuan pesan tidak terkirim (optional)
  • A valid email address is required. — Teks pemberitahuan email tidak valid (optional)
  • Message field cannot be empty. — Teks pemberitahuan saat isi pesan kosong (optional)

Kemana Semua Pesan Terkirim?

Semua pesan dalam formulir ContactForm ini akan masuk ke email Anda yang terdaftar atau yang digunakan untuk login di Blogger. Silahkan buka Gmail Anda dan cek di bagian tab Update, jika Anda tidak menemukannya maka kemungkinan besar pesannya masuk ke folder SPAM

Get Blog ID

On Blogger dashboard page, please look at the address bar browser, you will find an example url as below:

https:/www.blogger.com/blog/posts/0000000000000000000

The part marked in url above is your blog ID, you can copy the ID first because it will be needed to activate the ContactForm script later.

Creating a New Page

We assume you already understand how to create a new page, the next thing to do is to use the post templates provided:

  1. Open the 'Post and Pages' folder in Google Drive,
  2. find the file named Contact Form.txt
  3. copy all existing code,
  4. in Blogger post editor, switch to HTML mode by clicking icon and then selecting HTML View
  5. Paste all the code that was copied earlier into the post.

In order for the Contact page to work properly, add your blog ID and blog url in the ContactForm script. To make things easier for you, we've marked which parts of the post template should be changed:

<script>/*<![CDATA[*/ if (typeof(BLOG_attachCsiOnload) != 'undefined' && BLOG_attachCsiOnload != null) { window['blogger_templates_experiment_id'] = 'templatesV1';window['blogger_blog_id'] = '0000000000000000000';BLOG_attachCsiOnload(''); }_WidgetManager._Init('//www.blogger.com/rearrange?blogID\0000000000000000000','//www.yourDomain.com/','0000000000000000000'); _WidgetManager._RegisterWidget('_ContactFormView', new _WidgetInfo('ContactForm1', 'footer1', null, document.getElementById('ContactForm1'), {'contactFormMessageSendingMsg': 'Sending...', 'contactFormMessageSentMsg': 'Your message has been sent.', 'contactFormMessageNotSentMsg': 'Message could not be sent. Please try again later.', 'contactFormInvalidEmailMsg': 'A valid email address is required.', 'contactFormEmptyMessageMsg': 'Message field cannot be empty.', 'title': 'Contact Form', 'blogId': '0000000000000000000', ... /*]]>*/</script>
Description
  • 0000000000000000000 — Replace with your blog ID, there are approximately 4 similar codes in the script above.
  • //www.yourDomain.com/ — Replace with your blog url (without http/https)
  • Sending... — Notification text when sending a message (optional)
  • Your message has been sent. — Text of sent message notification (optional)
  • Message could not be sent. Please try again later. — Message notification text not sent (optional)
  • A valid email address is required. — Invalid email notification text (optional)
  • Message field cannot be empty. — Notification text when message body is empty (optional)

Where Are All Messages Sent?

All messages in this ContactForm form will go to your registered email or the one used to login on Blogger. Please open your Gmail and check the Update tab, if you don't find it then most likely the message went to the SPAM folder


Posting Komentar

To avoid SPAM, all comments will be moderated before being displayed.