Skip to content

Instantly share code, notes, and snippets.

@tobiasstrebitzer
Last active May 18, 2021 08:56
Show Gist options
  • Save tobiasstrebitzer/62f319bfa66ad3b617cdb1d212c872cc to your computer and use it in GitHub Desktop.
Save tobiasstrebitzer/62f319bfa66ad3b617cdb1d212c872cc to your computer and use it in GitHub Desktop.
Universal Form - Trial Example
<universal-form mode="dark">
<universal-form-input name="name" label="Name" type="text" placeholder="Jane" required></universal-form-input>
<universal-form-input name="email" label="Email" type="email" placeholder="jane.doe@gmail.com" required></universal-form-input>
<universal-form-phone name="phone" label="Phone" placeholder="+1 555 555 1234"></universal-form-phone>
<universal-form-credit-card name="card" label="Card" required></universal-form-credit-card>
<universal-form-input name="coupon" label="Coupon" placeholder="X2C74N3A" pattern="^[a-zA-Z0-9-]{8}$" pattern-error="Invalid coupon code"></universal-form-input>
<universal-form-submit label="Start Trial" thankYouText="Thank You!"></universal-form-submit>
<universal-form-target-stripe url="https://api.domain.com/register" fields="email name phone" publishable-key="pk_live_xxxxxxxxxxxxxxxxxx"></universal-form-target-stripe>
<universal-form-target-rest-api url="https://api.domain.com/trial" fields="email coupon"></universal-form-target-rest-api>
<universal-form-target-intercom app-id="xxxxxxxx" event="trial" properties="product=universal-form"></universal-form-target-intercom>
</universal-form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment