Create a form with email field

Create a form with email field

  • Published by
    Yannick Berges
  • Last modified
    10 August 2023
  • Voting
    Average rating
    1 vote
  • Favourites
  • Concerns
  • Since Version
  • Up to date
  • Profile concerned
    Webdesigner, Developer

In flexicontent you can add an email field :
- user can set an email in backend
- in front-end that display email with a mailto

But in Joomla 4 you can do more ! Now you can create a complet form that send email and content to email set in backend. 

The  feature :

  • Allow to use all html5 form field (text, list, email, radio, checkbox, date, date and time, range, text area, free html, hiddden field, telephone, url and file field)
  • Drag an drop ordering
  • Multi value in field
  • Translatable Label
  • Required option
  • Html5 patern validation
  • Upload files with multi mode and mime verification

In this tutorial we will explain how to create a complet form for an estate

Create email field

In flexicontent create an email field

email field creation

Choose form layout

In editing part set option like disable expand option, simple design

form option

In viewing tab choose form layout (you can own easly)

form layout

Configure form display

Now in Layout tab you will have all form options

display option

You can set if an emal is sended to a specific email (admin email)
admin email


You can set separate display between item and category view with a modal system

modal display

Display a button or inline form

display buttonform-inlione

or display form inline

Adding field in form

Now you can create field for you form

- You need to have 1 email field with emailfrom in id/name AND
- 1 field with name in id/name OR - 1 field with firstname and 1 field with lastname in Id/name


in email field you can add a validation pattern like 

This email address is being protected from spambots. You need JavaScript enabled to view it. for only this type of email

that for initialize your form

Now you can add more fields

Radio field

We create a field to choose only one value 

radio field


Select field

We will add a select list for number of room

number of room

Telephone field

Here you can use custom pattern for input 

you can use : 

^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$


telephone field

Checkbox field

The checkbox field is the only one that required doesn't works yet don't use this option

checkbox field

Range field

Now we will add a slider to select price

value is like value min;;value max;;step


Note : range display need to be adapte with css to avoid any template conflict


Html field

This field is for adding some html information in form like sub title etc


display this in form

html render

Hidden field

the hidden field is realy interessting if you add js script to populate it. Like adding the name of page, a flexionontent value in item etc


Date and date time field

With this field you can create date field for your form with or without time



File field

Now will finish with file field, taht can allow user to upload and join file.


In this case we add a select file, with multi file (5 max) and allow user to upload jpg only

Files are upload in tmp folder site, attach to email and trashed after sending.

Now you have finish to add custom fields in your form

Custom submit button

you can customize name of button and adapt at your design easier !

custom button

Consent radio

You can add and consent radio in order to be RGPD compilant. Becarefull this form system doesn't save any email or value sended in database its only for sending email.



You can use captach protection, configure your joomla captcha plugin and just set yes to this option



Result :



That it we hope you like this feature !

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
These cookies are needed to make the website work correctly. You can not disable them.
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics