Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="container">
  <h1 class="text-center">
    【GAS】 スプレッドシートと連携したAjaxフォーム
  <hr />
  <form action="" class="form-horizontal">
    <input name="SPREADSHEET_ID" type="hidden" value="179G_PAUfFupy5T1rN1WKadgdSnCzpYL8JU7FdEGd54k" /><input name="SHEET_NAME" type="hidden" value="フォームデータ" />
    <div class="form-group">
      <label class="col-md-2 control-label">メールアドレス</label>
      <div class="col-md-10">
        <input class="form-control" name="メールアドレス" placeholder="" type="email" />
        <p class="help-block">
          メールアドレスを入力すると、そのアドレス宛に自動返信メールを送信します。<br />メールアドレスはスプレッドシートに登録されないので、安心してお試し下さい。自分のGmail(lab.snowsunny)に送信履歴が残りますが、その情報を何かに使用する事は有りません。<br />どうしても不安なら<a href="">One-Time.Email</a>を使うのがおすすめです!HTMLメールとテキストメールの両方を同時に確認する事が出来ます。
    <div class="form-group">
      <label class="col-md-2 control-label">Qiitaのユーザー名</label>
      <div class="col-md-10">
        <input class="form-control" name="Qiitaのユーザー名" placeholder="良ければQiitaのユーザー名を教えて下さーい" />
    <div class="form-group">
      <label class="col-md-2 control-label">一言コメント</label>
      <div class="col-md-10">
        <input class="form-control" name="一言コメント" placeholder="適当でOK。何かコメントを貰えるだけで喜びます!(`・ω・´)b" required="required" />
    <div class="form-group">
      <div class="col-md-offset-2 col-md-10">
        <button class="btn btn-primary" type="submit">送信</button>
  <hr />
  <h3 class="text-center">
  <p class="text-center">
  <div class="text-center">
    <a href="">【短いコードで色々出来る】Google Apps Scriptでスプレッドシートと連携した無料Ajaxフォームの作り方※サンプル付き【自動返信メールもあるよ】</a>


    border-radius: 4px
    border-bottom-left-radius: 0px
    border-bottom-right-radius: 0px
    border-top-left-radius: 0px


                $ ->
  required_tag = '<span class="label label-danger">必須</span>'
  requires = $('form [required]').each (i, elm)->
    $(elm).before required_tag

    debug: true
    submitHandler: (e)->
      form = $ e
      btn_submit = form.find('button[type=submit]')
        url: form.attr 'action'
        dataType: 'jsonp'
        data: form.serialize()

        beforeSend: ->
          btn_submit.attr 'disabled', true
        complete: ->
          btn_submit.attr 'disabled', false

        success: (response)->
          console.log response
          # 成功したらサンクスページとかに飛ばす処理の例↓
          # window.location.href = ''
        error: (response)->
          console.log response