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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


              <!-- Include our widget script//-->
<script id="pigeon-wjs" src=""></script>

<form class="pure-form pure-form-aligned" method="post" action="#" name="competition-upload">
  <fieldset id="initial-fields">
    <div class="pure-g">
      <div class="pure-u-2-3">

        <div class="pure-control-group">
          <label for="name">Your Name</label>
          <input id="name" type="text" required value="Joe Submitter">

        <div class="pure-control-group">
          <label for="email">Email Address</label>
          <input id="email" type="email" required value="">

        <div class="pure-control-group">
          <label for="title">Film Title</label>
          <input id="title" type="text" required value="The Pigeon Diaries">

        <div class="pure-control-group">
          <label for="director">Director's name</label>
          <input id="director" type="text" required value="Jane Director">

      <div class="pure-u-1-3">


          <label for="doco" class="pure-radio">
            <input id="doco" type="radio" name="genre" value="Documentary" checked>

          <label for="animation" class="pure-radio">
            <input id="animation" type="radio" name="Animation" value="option2">

          <label for="live-action" class="pure-radio">
            <input id="live-action" type="radio" name="genre" value="Live Action">
            Live Action

          <label for="experimental" class="pure-radio">
            <input id="experimental" type="radio" name="genre" value="Experimental">

          <label for="other" class="pure-radio">
            <input id="other" type="radio" name="genre" value="Other">

      <div class="pure-controls" id="submit-controls">
        <button type="button" id="initial-field-submit" class="pure-button pure-button-primary" onclick="continueToUpload()">Continue</button>

  <fieldset id="uploader"><!-- Widget will get inserted here //--></fieldset>


              body {
  background-color: #eee;

form {
  margin: 10px;

#uploader:empty {
  display: none;

#uploader {
  background-color: #fcfafa;
  margin: 0px 10px;
  padding: 10px;
  border: 1px solid #ccc !important;
  box-shadow: inset 0 1px 3px #ddd;
  border-radius: 4px;

label:not(.pure-radio) {
  font-weight: bold;

input:disabled {
  background-color: #eee;


              //We've added a click trigger to the 'Continue' button
// onclick="continueToUpload()"
//This function will: 
//1. validate the form
//2. Gather field values
//3. Format additional information to a 'message' string
//4. Initialise the widget with the form values

function continueToUpload() {
  //1. Let's make sure the form is valid before continuing
  if (!document.forms["competition-upload"].reportValidity()) return;

  //If the form is valid then let's disable the fields for the next step
    .setAttribute("disabled", "disabled");
  //Hide the 'Continue' button
  document.getElementById("submit-controls").style.display = "none";

  //2. We'll collect all the field values
  var name = document.getElementById("name").value;
  var email = document.getElementById("email").value;
  var title = document.getElementById("title").value;
  var director = document.getElementById("director").value;
  var genre = document.querySelector('input[name="genre"]:checked').value;

  //3. We'll put the Director and Genre information together to go into the message field
  var message = "Director: " + director + "\n" + "Genre: " + genre;

  //4. Now we can initialise the widget with the pre-populated fields
  //Since we have all the information we need it will show as a simple file chooser.
  //The code below is modified from the Avanced Snippet in the Widget Editor.
      fields: {
        name: {
          value: name //pass in the name from the form
        email: {
          value: email //pass in the email from the form
        summary: {
          value: title //pass in the film title from the form
        message: {
          value: message //pass in the message we formatted above
      customize: {
        "color-scheme": "light",
        "link-color": "#0078e7",
        "background-color": "#fcfafa"

  return false;