Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Demo request

Use a demo request form to collect a name, email and a few details, with name and email required.

Four fields, two required
Talk to us

Book a payroll demo

A specialist calls you back within one working day.

Show code
<app-section-lead-capture title="Book a payroll demo" eyebrow="Talk to us"
    subtitle="A specialist calls you back within one working day."
    fields="name,email,phone,message" required="name,email"
    action="/demo" success-title="Thanks, we have your enquiry"
    success-text="A specialist will be in touch.">
    We use your details only to reply to this enquiry.
</app-section-lead-capture>

Left-aligned

Left-align the copy and form when the panel's text should share the page's left edge.

Checklist offer, muted band

Get the checklist

Show code
<app-section-lead-capture align="Start" variant="Muted" title="Get the checklist"
    fields="name,email,company" required="name,email"
    action="/demo" submit-label="Send me the checklist"
    success-title="Check your inbox" />

Field labels

Set your own field labels when the form's wording should match the page, not the built-in English.

Custom labels, message required

Book a payroll demo

Show code
<app-section-lead-capture title="Book a payroll demo"
    fields="name,email,message" required="name,email,message"
    name-label="Full name" email-label="Work email" message-label="How can we help?"
    action="/demo" success-title="Thanks, we have your enquiry" />

Every option

Every value of every prop, one cell each.

title

title="Get the checklist"

Get the checklist

description

description="A short paragraph above the form."

Book a payroll demo

A short paragraph above the form.

fields

name

Book a payroll demo

email

Book a payroll demo

phone

Book a payroll demo

company

Book a payroll demo

message

Book a payroll demo

required

required="name"

Book a payroll demo

required="name,email,message"

Book a payroll demo

onSubmit

onSubmit (React only): a callback; this form posts to action instead

Book a payroll demo

action

action: the URL the form posts to, not visible on the page

Book a payroll demo

submitLabel

submit-label="Send" (default)

Book a payroll demo

submit-label="Send me the checklist"

Book a payroll demo

nameLabel

name-label="Name" (default)

Book a payroll demo

name-label="Full name"

Book a payroll demo

emailLabel

email-label="Email" (default)

Book a payroll demo

email-label="Work email"

Book a payroll demo

phoneLabel

phone-label="Phone number" (default)

Book a payroll demo

phone-label="Mobile number"

Book a payroll demo

companyLabel

company-label="Company" (default)

Book a payroll demo

company-label="Organisation"

Book a payroll demo

messageLabel

message-label="Message" (default)

Book a payroll demo

message-label="How can we help?"

Book a payroll demo

requiredText

requiredText (React only): the message for an empty required field

Book a payroll demo

invalidEmailText

invalidEmailText (React only): the message for a malformed email

Book a payroll demo

submitErrorText

submitErrorText (React only): the message when a send fails

Book a payroll demo

successTitle

success-title="Check your inbox" (shown after a send)

Book a payroll demo

successText

success-text="A specialist will be in touch." (shown after a send)

Book a payroll demo

sent

sent="false" (default)

Book a payroll demo

sent="true"

Book a payroll demo

consent

(content)

Book a payroll demo

as

as="h1"

Book a payroll demo

as="h2" (default)

Book a payroll demo

as="h3"

Book a payroll demo

as="h4"

Book a payroll demo

as="h5"
Book a payroll demo
as="h6"
Book a payroll demo

eyebrow

eyebrow="Talk to us"
Talk to us

Book a payroll demo

subtitle

subtitle="A specialist calls you back within one working day."

Book a payroll demo

A specialist calls you back within one working day.

align

align="start"

Book a payroll demo

align="center" (default)

Book a payroll demo

variant

variant="default" (default)

Book a payroll demo

variant="muted"

Book a payroll demo

className

className (React only): extra class names on the root element

Book a payroll demo

Guidance

What to do, and what to avoid.

Use it when

  • A marketing page that asks for a lead: a demo, a quote or a callback.
  • Up to five short fields, sent by a server action that rejects with a curated message, never a raw exception, because the visitor sees it.

Reach for something else when

  • A form with more than five fields, or with several steps. → AppFormSection
  • A sign-in or account form. → AppFormSection

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

start center
default muted
name, email name, email, company name, email, phone, message all five
none name name, email name, email, message
h1 h2 h3 h4 h5 h6
Talk to us

Book a payroll demo

A specialist calls you back within one working day.

React, generated from the controls
<AppSectionLeadCapture eyebrow="Talk to us" title="Book a payroll demo" subtitle="A specialist calls you back within one working day." submitLabel="Send" fields={[{"name":"name","required":true},{"name":"email","required":true},{"name":"phone"},{"name":"company"},{"name":"message"}]} successTitle="Thanks, we have your enquiry" successText="A specialist will be in touch." consent="We use your details only to reply to this enquiry." onSubmit={saveLead} />
Razor, the same props
<app-section-lead-capture title="Book a payroll demo" eyebrow="Talk to us" subtitle="A specialist calls you back within one working day." fields="@(new[] { LeadCaptureField.Name, LeadCaptureField.Email, LeadCaptureField.Phone, LeadCaptureField.Company, LeadCaptureField.Message })" required="@(new[] { LeadCaptureField.Name, LeadCaptureField.Email })" action="/Components/AppSectionLeadCapture" success-title="Thanks, we have your enquiry" success-text="A specialist will be in touch.">We use your details only to reply to this enquiry.</app-section-lead-capture>

20 props. The 5 most used come first.

Used on most screens 5 props

PropTypeDefaultDescription
titledefault - string - The section's heading. Required.
fieldsdefault - name, email, phone, company, message - The fields in order, as a comma list. Required.
name-labeldefault Name string Name Replaces the built-in English text, for other languages.
email-labeldefault Email string Email Replaces the built-in English text, for other languages.
phone-labeldefault Phone number string Phone number Replaces the built-in English text, for other languages.

Less common 15 props

PropTypeDefaultDescription
descriptiondefault - string - A paragraph above the form. Use subtitle for the sentence under the heading.
requireddefault - string - The fields that must have a value, as a comma list of the names in fields.
actiondefault - string - The URL the form posts to. Required.
submit-labeldefault Send string Send The button's label.
company-labeldefault Company string Company Replaces the built-in English text, for other languages.
message-labeldefault Message string Message Replaces the built-in English text, for other languages.
success-titledefault - string - The heading of the block shown after a send. Required.
success-textdefault - string - The sentence under the success heading.
sentdefault false bool false Draws the success block in place of the form.
eyebrowdefault - string - A short label above the heading.
subtitledefault - string - A sentence under the heading.
asdefault h2 h1 | h2 | h3 | h4 | h5 | h6 h2 The heading element.
aligndefault center start | center center Where the copy and form sit in the panel.
variantdefault default default | muted default The section's background around the panel.
(content)default - markup - A line under the button, such as a privacy notice.

Screen reader

3 notes
  • Each field has a visible label, and a required field is marked as required to the browser.
  • The form is not validated by the browser, so the messages shown are the section's own, next to each field.
  • A failed send is announced in an alert above the button, and a sent form is replaced by a success alert.