Difference between revisions of "Email field"

From EPrints Documentation
Jump to: navigation, search
m (Inheritance)
(Additional Properties)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{fieldtypes}}
 
{{fieldtypes}}
__NOTOC__
+
 
 +
 
 +
== Description ==
 +
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 <tt>mailto:</tt> link to the email (unless the <tt>render_dont_link</tt> property is set).
 +
 
 
== Inheritance ==
 
== Inheritance ==
 
+
* [[:Category:EPrints_Metadata_Fields|Metadata Field]]
* [[Metadata Fields|Metadata Field]]
 
 
** [[Id field]]
 
** [[Id field]]
 
*** [[Idci field]]
 
*** [[Idci field]]
 
**** [[Email field]]
 
**** [[Email field]]
  
== Description ==
+
== Additional Properties ==
 +
Same as [[Idci field#Additional_Properties|Idci fields]] except for:
 +
{| border="1" cellpadding="3" cellspacing="0"
 +
! Name !! Default Value !! Required || Description || Notes
 +
|-
 +
| '''render_dont_link''' || <tt>0</tt> || NO || Whether to render the email address as a mailto link. || As for [[Metadata]] but actually applicable.
 +
|-
 +
|}
  
This field works just like a text field except that
+
== Required Phrases ==
* it gives a validation error if it does not appear to be a valid email address
+
No additional phrases beyond those required for [[Idci field#Required_Phrases|Idci fields]].
* when rendered it is rendered as a mailto: link to the email (unless the render_dont_link property is set).
 
  
== Properties ==
+
== Database ==
 +
Email fields are stored in the database as
  
As for [[Id field]]s.
+
fieldname VARCHAR(255)
  
== Required Phrases ==
+
== API ==
 +
See [[API:EPrints/MetaField/Email|API page]].
  
none.
+
== Examples ==
 +
Most basic example.
 +
{
 +
    name => "contact_email",
 +
    type => "email",
 +
}
 +
Do not render the email address as a <tt>mailto:</tt> link.
 +
{
 +
    name => "user_email",
 +
    type => "email",
 +
    render_dont_link => 1,
 +
}

Latest revision as of 21:29, 11 April 2023

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


Metadata Fields: Arclanguage - Base64 - Bigint - Boolean - Compound - Counter - Dataobjref - Date - Decimal - Email - Fields - Float - Id - Idci - Image - Int - Itemref - Keywords - Langid - Longtext - Longtext_counter - Multilang - Multipart - Name - Namedset - Pagerange - Recaptcha - Recaptcha3 - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid


Description

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

Additional Properties

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

No additional phrases beyond those required for Idci fields.

Database

Email fields are stored in the database as

fieldname VARCHAR(255)

API

See API page.

Examples

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,
}