Jump to content

Email field: Difference between revisions

From EPrints Documentation
 
(One intermediate revision by the same user not shown)
Line 16: Line 16:
Same as [[Idci field#Additional_Properties|Idci fields]] except for:
Same as [[Idci field#Additional_Properties|Idci fields]] except for:
{| border="1" cellpadding="3" cellspacing="0"
{| border="1" cellpadding="3" cellspacing="0"
| name || default || description
! Name !! Default Value !! Required || Description || Notes
|-
|-
| '''render_dont_link''' || 0 || ''as for [[Metadata]] but actually applicable.''
| '''render_dont_link''' || <tt>0</tt> || NO || Whether to render the email address as a mailto link. || As for [[Metadata]] but actually applicable.  
|-
|-
|}
|}


== Required Phrases ==
== Required Phrases ==
No additional phrases.
No additional phrases beyond those required for [[Idci field#Required_Phrases|Idci fields]].


== Database ==
== Database ==

Latest revision as of 21:29, 11 April 2023


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