Skip to content

Instantly share code, notes, and snippets.

@gchiu
Created July 19, 2017 05:00
Show Gist options
  • Save gchiu/7bff1a2826b8eceea1c6d28a7ca8faa1 to your computer and use it in GitHub Desktop.
Save gchiu/7bff1a2826b8eceea1c6d28a7ca8faa1 to your computer and use it in GitHub Desktop.
{<form class="layout_primary" id="login_form" action="/identity/users/sign_in?client_id=1id3ui9jj7224ycc1wkn008uw6vsxdo&amp;redirect_uri=https%3A%2F%2Fmyflick.flickelectric.co.nz%2Fauth%2Fflick_connect%2Fcallback&amp;response_type=code&amp;scope=openid+email+profile&amp;state=5da93efe112b868300b686bf7d60d297935b8255fd3199f7" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="H0/4fCOJ+7DAw/cpkSi+lZQgQxEaJSBh2BTZX1JSzyfRAcUchSsFnMTzbO1tQdlsqeYUG69AeeI9ybtukkwJHg==" />
<input type="hidden" name="response_type" value="code">
<input type="hidden" name="client_id" value="1id3ui9jj7224ycc1wkn008uw6vsxdo">
<input type="hidden" name="redirect_uri" value="https://myflick.flickelectric.co.nz/auth/flick_connect/callback">
<input type="hidden" name="scope" value="openid email profile">
<input type="hidden" name="state" value="5da93efe112b868300b686bf7d60d297935b8255fd3199f7">
<input type="hidden" value="false" name="user[guest]" id="user_guest" />
<div class="float-label">
<fieldset>
<input required="required" aria-label="Email address" type="email" value="" name="user[email]" id="user_email" />
<label for="user_email">Email</label>
</fieldset>
<fieldset>
<input autocomplete="off" required="required" aria-label="Password" type="password" name="user[password]" id="user_password" />
<label for="user_password">Password</label>
</fieldset>
</div>
<div class="form_row checkbox">
<input name="user[remember_me]" type="hidden" value="0" /><input aria-label="Remember me" type="checkbox" value="1" name="user[remember_me]" id="user_remember_me" />
<label for="user_remember_me">Remember me</label>
</div>
<div class="form_actions h-centered">
<button name="button" type="submit" class="button c-square-button" aria-label="Sign in">Sign in</button>
</div>
}
@rgchris
Copy link

rgchris commented Jul 19, 2017

Can try this:

import <xml>

webform: load mold load-xml load https://gist.githubusercontent.com/gchiu/7bff1a2826b8eceea1c6d28a7ca8faa1/raw/216705586eddad9b703337509e109359f07c5768/flickform

inputs: collect [
    use [rule hit][
        parse webform rule: [
            some [
                opt [
                    hit: [<input> | <button>] block! (
                        keep select hit/2 #name
                        keep select hit/2 #value
                    ) :hit
                ]
                skip [and block! into rule | skip]
            ]
        ]
    ]
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment