Skip to content

Building a Form ​

Forms live under Components → DC Leads → Forms. Each form is built once and can be placed on as many pages as you like with a module or menu item – see Placing a Form.

Forms List ​

ColumnShows
StatusPublished or unpublished. An unpublished form is not shown anywhere on the site
TitleThe form title and its alias
On the siteEvery module (Module) and menu item (Page) that shows the form, linked to its edit screen. Not placed yet when there are none
FieldsNumber of fields
LeadsLeads received through the form, linked to the filtered lead list

The toolbar has New, Duplicate, Publish, Unpublish, Check-in and Delete. Duplicate copies the selected forms with " (copy)" added to the title; copies start unpublished. Deleting a form keeps the leads already received through it.

Sort by title, Most leads first, Recently changed or ID.

Form Details ​

SettingNotes
TitleRequired. Shown in lead emails and the lead list as the form the lead came from
AliasMade from the title when empty. Must be unique
StatusPublished or Unpublished

Fields Tab ​

Click Add a field to add a row. Drag a row, or use the up and down arrows, to change the order. A form needs at least one field.

Field Types ​

The type list has two groups. Contact details fill the lead's own columns (name, email, phone, subject, message) – a form can hold one of each. Other questions are stored as extra answers on the lead, under their label.

TypeGroupWhat the visitor gets
NameContact detailsA text box. Label defaults to "Your name"
EmailContact detailsAn email box. The address must be valid, with a dot in the domain. Label defaults to "Your email"
PhoneContact detailsA phone box with a country flag picker. The number is checked as it is typed and stored in international form, for example +919876543210. Label defaults to "Your phone number"
SubjectContact detailsA dropdown when Choices are entered, a text box otherwise. Label defaults to "Subject"
MessageContact detailsA large text area, up to 5,000 characters. Label defaults to "What do you need?"
Short textOther questionsA one-line text box, up to 255 characters
Long textOther questionsA text area, up to 5,000 characters
DropdownOther questionsA select list of your Choices
RadioOther questionsOne choice from your Choices
CheckboxesOther questionsAny number of your Choices
NumberOther questionsA number box
DateOther questionsThe browser's date picker
Website addressOther questionsA web address. https:// can be left off
CountryOther questionsA searchable country list, with an optional state or province field
Consent boxOther questionsA checkbox. Label defaults to "I agree to be contacted about this enquiry." Stored as "Yes" when ticked
Heading or noteOther questionsNo input. The label shows as a small heading and Note text as a paragraph

Every type in Other questions needs a label, except Consent box and Heading or note. Contact fields left without a label use the defaults above.

Field Settings ​

The settings shown depend on the type.

SettingTypesNotes
TypeAllSee the table above
LabelAllThe question shown above the input
WidthAllFull or Half. Two half-width fields sit side by side from tablet width up and stack on phones
RequiredAll except Heading or noteRequired fields get a red *, and the form shows "Fields marked * are required."
ChoicesSubject, Dropdown, Radio, CheckboxesOne per line. Only these values are accepted
Choices side by sideRadio, CheckboxesShows the choices in a row instead of a list
Ask for state or provinceCountryAdds a state or province field beside the country
Note textHeading or noteThe paragraph under the heading

More options: placeholder, help text, field name opens three more settings:

SettingTypesNotes
PlaceholderName, Email, Phone, Subject, Message, Short text, Long text, Number, Website addressGrey example text inside the empty input
Help textAll except Heading or noteA short line under the input
Field nameOther questions, except Heading or noteUsed in links that Prefill by URL. Made from the label when empty. Letters, numbers and underscores

Email and Phone ​

  • A form with only one of Email or Phone always requires it, so every lead can be answered.
  • A form with both, where neither is required, asks for at least one. The form shows "You only need to give one: email or phone." under them.

Phone Fields ​

The flag picker starts on the Default country from General Settings. With no default country, it uses the country from the visitor's browser language. When the form also has a Country field, choosing a country sets the flag of an empty phone field.

Country and State ​

With Ask for state or province on, a second field of the same width appears beside the country. For 13 countries it is a searchable list of that country's divisions, labelled to match:

LabelCountries
StateUnited States, Australia, India, Brazil, Mexico
ProvinceCanada, Spain, Italy, Indonesia, South Korea
PrefectureJapan
EmirateUnited Arab Emirates
CountyTaiwan

For every other country it is a free text box labelled "State or province". When the country is required, the state is required too wherever a list exists.

The Default country setting preselects the country.

Text and Button Tab ​

SettingDefaultNotes
Heading–Shown above the form, or beside it, depending on the module or menu item layout
Intro text–Editor text shown with the heading
Button textSendThe submit button label
Button classesbtn-primaryBootstrap button classes, for example btn-primary btn-lg or btn-outline-dark. The btn class is always added
Note under the form–Small text above the button, for example a privacy notice. For a box the visitor must tick, add a Consent box field instead

After Sending Tab ​

SettingDefaultNotes
Thank you pageNoneA menu item to send the visitor to after a successful send. A page of its own is the easiest way to track an ad conversion
Thank you message"Thank you. We have your message and will reply soon."Only used when no thank-you page is chosen
After sendingShow the message onlyShow the message above the form keeps the form, emptied for another enquiry, which suits support pages. Only used when no thank-you page is chosen

Overrides Tab ​

Settings for this form only. An empty field, or Use default, follows Components → DC Leads → Settings, and shows the value that applies.

SettingNotes
CaptchaFor example No captcha on an ad landing page, while other forms keep one
Minimum seconds on the formThe spam timer for this form
Email me new leadsOn or off for this form
Send toRecipients for this form's leads, for example sales or support
SubjectThe notification subject. Placeholders: {name}, {form}. Possible spam keeps its [Possible spam] mark
Send auto-replyOn or off for this form
Reply-To name, Reply-To email, Subject, MessageThe auto-reply for this form
Default countryThe phone flag and country field this form starts on
Assign toNew leads from this form go straight to this user

Resending a lead's email from the lead list uses its form's overrides too.

How the Form Sends ​

With JavaScript, the form checks each field as the visitor sends it, shows errors beside the fields, and sends in the background with a spinner on the button. The thank-you message replaces the form, or the visitor is taken to the thank-you page.

Without JavaScript, the form posts normally. Errors and the values entered come back on the same page, and the thank-you message shows with the page messages.

The server checks every submission again, whichever way it arrives.

Conversion Events ​

After a successful send, the form fires a dcleads:submitted browser event (its detail holds form, the alias, and formId) and, when Google Tag Manager's dataLayer is on the page, pushes:

js
{ event: 'dcleads_submitted', dcleads_form: '<form alias>', dcleads_form_id: <form id> }

Use either as a conversion trigger, or use a thank-you page.

Joomla Extensions by Contona