Jump to content

Email field

From EPrints Documentation
Revision as of 21:29, 11 April 2023 by Drn@ecs.soton.ac.uk (talk | contribs) (→Additional Properties)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Description[edit]

This field works just like a text field except that

  • it gives a validation error if it does not appear to be a valid email address
  • when rendered it is rendered as a mailto: link to the email (unless the render_dont_link property is set).

Inheritance[edit]

Additional Properties[edit]

Same as Idci fields except for:

Name Default Value Required Description Notes
render_dont_link 0 NO Whether to render the email address as a mailto link. As for Metadata but actually applicable.

Required Phrases[edit]

No additional phrases beyond those required for Idci fields.

Database[edit]

Email fields are stored in the database as

fieldname VARCHAR(255)

API[edit]

See API page.

Examples[edit]

Most basic example.

{
    name => "contact_email",
    type => "email",
}

Do not render the email address as a mailto: link.

{
    name => "user_email",
    type => "email",
    render_dont_link => 1,
}